-
Notifications
You must be signed in to change notification settings - Fork 4
Add TotalPowerConsumption and TotalPowerGenerated telemetry channels to PowerMonitor #82
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
Merged
Mikefly123
merged 18 commits into
main
from
copilot/add-total-power-consumption-channel
Nov 12, 2025
+214
−17
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9defaf1
Initial plan
Copilot 51bd3c6
Add TotalPowerConsumption telemetry and RESET command to PowerMonitor
Copilot d51218e
Add TotalPowerConsumption to PowerMonitor telemetry packet
Copilot da4c55e
Fix trailing whitespace in PowerMonitor files
Copilot 94dba23
Fix integration test timing and assertions
Copilot e2ef488
Apply code formatters (clang-format and ruff)
Copilot 94c96f5
Fix event logging function name for TotalPowerReset
Copilot 0ce31e7
Fixed Tests?
Mikefly123 c8266c5
Fixed for real?
Mikefly123 8b57df0
Fix critical issues causing Zephyr crash
Copilot 759d02c
Correct event log function to log_ACTIVITY_LO_TotalPowerReset
Copilot 3dfbb9d
Add TotalPowerGenerated telemetry for solar power tracking
Copilot 0eb0a9d
Increase command dispatcher table size to 55
Copilot ced08d4
merge
ineskhou e41565c
linter appeasement
ineskhou 424c1cb
removed b test
ineskhou f0449c6
deplit
ineskhou bc3a4c5
added explicit argument matching to antenna deployer
ineskhou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify if the INA219Manager is able to return negative power numbers or if the number will always be positive. It is possible for the sensor to read a negative power number if power flows backwards through the shunt resistor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The INA219 sensor can return negative power values when current flows backwards through the shunt resistor. The current implementation at line 105 rejects negative values with the guard
if (powerW < 0.0 || powerW > 1000.0).For solar power generation tracking, this guard may need adjustment depending on how the sensor is wired:
The current implementation assumes positive power = generation and rejects negative values. This should be verified against the actual hardware wiring. If negative values are valid for generation (e.g., sensor wired backwards), the guard should be changed to
if (powerW > -1000.0 && powerW < 0.0)and useabs(powerW)for accumulation, or adjust based on the specific wiring configuration.