Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and refactor analog input class #407

Merged
merged 15 commits into from
Feb 7, 2023
Merged

Fix and refactor analog input class #407

merged 15 commits into from
Feb 7, 2023

Conversation

brentru
Copy link
Member

@brentru brentru commented Feb 6, 2023

This pull request:

  • Resolves Feather HUZZAH ESP32 Pot. no data #406
  • Refactors Wippersnapper_AnalogIO class:
    • Changes processAnalogInputs() to update() to match other, newer, component class APIs. Large refactoring for readability and maintainability around this new method
    • Added encodePinEvent func to encode and publish signal message to IO
    • Removes unused initAnalogOutputPin, superseded by PWM class
  • Refactors configurePinRequest() into configAnalogInPinReq() and configureDigitalPinReq()
  • Note: this is not a complete refactoring of the class, only what I was confused about/thought needed immediate attention for maintainability and compatibility with other component APIs.

Resolves:
#406
#403 (needs testing!)

Required tests prior to merging:

  • Test LED component toggle (digital class since decoder func. was touched
  • Test Pot. component: Periodic polling, raw adc
  • Test Pot. component: Periodic polling, voltage
  • Test Pot. component: "on change" polling, raw adc
  • Test Pot. component: "on change" polling, voltage
  • Test Pot. with PicoW

@brentru brentru merged commit 480a034 into adafruit:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feather HUZZAH ESP32 Pot. no data
1 participant