Skip to content

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

Merged
tridge merged 1 commit intoArduPilot:masterfrom
rmackay9:battmonitor-dronecan-soh
Jan 10, 2024
Merged

BattMonitor: DroneCAN batteries report and log state-of-health percentage#25926
tridge merged 1 commit intoArduPilot:masterfrom
rmackay9:battmonitor-dronecan-soh

Conversation

@rmackay9
Copy link
Copy Markdown
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

Comment thread libraries/AP_BattMonitor/AP_BattMonitor_Logging.cpp Outdated
Comment thread libraries/AP_BattMonitor/LogStructure.h Outdated
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

I think this should go in

@rmackay9 rmackay9 force-pushed the battmonitor-dronecan-soh branch from 0a6fab4 to 5f9fa04 Compare January 9, 2024 03:16
Only DroneCAN backend implements this feature for now
@rmackay9 rmackay9 force-pushed the battmonitor-dronecan-soh branch from 5f9fa04 to 58a2274 Compare January 9, 2024 03:19
@tridge tridge merged commit dfd22ab into ArduPilot:master Jan 10, 2024
@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