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

BattMonitor: DroneCAN batteries report and log state-of-health percentage #25926

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Jan 8, 2024

This adds state-of-health percentage logging for DroneCAN battery backends. I've reduced the scope of this PR by removing the reporting via MAVLink.

The DroneCAN DSDL message already includes this field and the Tattu DroneCAN batteries send the value but we haven't made use of it until now.

This has been tested on real hardware (CubeOrangePlus with a Tattu battery). Below is a screenshot showing the SOH of 95%.

image

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

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

I think this looks basically OK, but we will have to merge the MAVLink change first so we can do the sub-module shuffle.

@hendjoshsr71
Copy link
Member

Note for DroneCAN we do have new messages that will be implemented eventually..... (---> looks at self <----)

Here those are : https://github.com/dronecan/DSDL/pull/7/files
For some reason they A.) got merged into the "ardupilot dsdl" & B.) dont show on the dronecan wiki page.

MAVLink
There are newer battery status messages to mirror those CAN messages.
Here is the newer Battery_Status message : https://mavlink.io/en/messages/development.html#BATTERY_STATUS_V2

It doesn't include state of health since that changes quite slowly.

Generally, adding fields to Battery_Status has been a nonstarter since it is already too large of a message.... (Nothing has been added in 4 years to it.)

I did check that the SMART_BATTERY_INFO Doesn't Include : https://mavlink.io/en/messages/common.html#SMART_BATTERY_INFO

@davidbuzz
Copy link
Collaborator

I think this should go in

Only DroneCAN backend implements this feature for now
@tridge tridge merged commit dfd22ab into ArduPilot:master Jan 10, 2024
90 checks passed
@rmackay9 rmackay9 deleted the battmonitor-dronecan-soh branch January 10, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants