Skip to content

Conversation

gminn
Copy link
Collaborator

@gminn gminn commented Oct 2, 2025

Add extra battery state information to the power module message:

  • Voltage
  • Whether the battery is charging or not

This data is generally useful to get the full picture of battery state.

For testing, a new shell command is now available to trigger a power
sample:

uart:~$ att_power sample
Requesting battery sample...
[00:01:41.007,843] <inf> power: Battery state of charge: 100.00%
[00:01:41.007,873] <inf> power: Battery voltage: 4.19V
[00:01:41.007,904] <inf> power: Charging: No

Signed-off-by: Gillian Minnehan [email protected]

@gminn gminn marked this pull request as ready for review October 2, 2025 15:02
@gminn gminn requested review from jtguggedal and noahp October 2, 2025 15:02
@gminn gminn force-pushed the gminn/add-extra-battery-state-info branch from 2d8635c to 1e8f41c Compare October 3, 2025 20:42
@gminn gminn requested review from noahp and simensrostad October 3, 2025 20:45
Copy link
Contributor

@jtguggedal jtguggedal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!
I left a couple of comments on the type of zbus observer to use. I think listener is a good fit for this use case.

@gminn gminn force-pushed the gminn/add-extra-battery-state-info branch 2 times, most recently from b4ebb4e to 63e4ea9 Compare October 6, 2025 18:29
@gminn gminn requested a review from jtguggedal October 6, 2025 18:29
Add extra battery state information to the power module message:
- Voltage
- Whether the battery is charging or not

This data is generally useful to get the full picture of battery state.

For testing, a new shell command is now available to trigger a power
sample:

```
uart:~$ att_power sample
Requesting battery sample...
[00:01:41.007,843] <inf> power: Battery state of charge: 100.00%
[00:01:41.007,873] <inf> power: Battery voltage: 4.19V
[00:01:41.007,904] <inf> power: Charging: No
```

Signed-off-by: Gillian Minnehan <[email protected]>
@gminn gminn force-pushed the gminn/add-extra-battery-state-info branch from 63e4ea9 to 89a9217 Compare October 6, 2025 18:34
Copy link

sonarqubecloud bot commented Oct 6, 2025

Copy link
Contributor

@jtguggedal jtguggedal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@simensrostad
Copy link
Contributor

@gminn lgtm, merging!

@simensrostad simensrostad merged commit 49656b4 into main Oct 7, 2025
4 checks passed
@simensrostad simensrostad deleted the gminn/add-extra-battery-state-info branch October 7, 2025 07:38
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.

4 participants