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

INA3221 sensor: use for bus voltage & environment metrics #4215

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

warrenguy
Copy link
Contributor

@warrenguy warrenguy commented Jun 30, 2024

fixes bugs:

  • ina3221 not used for device or environment telemetry
  • ina3221 getPower method overwrites environment telemetry
    • fix: write to the correct fields on the measurement struct depending on the measurement variant

small improvements to the ina3221 implementation:

  • add vars to define channels to use for battery voltage (for getBusVoltage) and environment metrics (default to CH1 for both)
  • DRY up the sensor measurement collection code a bit

- add to sensors available for environment telemetry
  (to report voltage/current)
- add vars to define channels to use for battery voltage
  (for getBusVoltage) and environment metrics (default
  to CH1 for both)
- write to the correct fields on the measurement struct
  depending on the measurement variant, and DRY up the
  sensor measurement collection code a bit
- this might be suitable for a common implementation for
  the INA* sensors in a future PR...
@thebentern
Copy link
Contributor

Has this been tested against power telemetry and environmental telemetry running simultaneously?

@warrenguy
Copy link
Contributor Author

Has this been tested against power telemetry and environmental telemetry running simultaneously?

yes, I have been running this branch with both enabled and it's working as expected

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.

None yet

2 participants