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

GCS_MAVLink: always send an idea of battery voltage as part of BATTERY_STATUS #8999

Merged

Conversation

WickedShell
Copy link
Contributor

This is actually a work around for the fact that if you are only parsing/handling BATTERY_STATUS we currently don't send any idea of pack voltage to the GCS if we don't have per cell monitoring. This PR encodes the pack voltage into the cells report if we don't have actual cell monitoring. While this comes off as a bit of a lie on the data it allows a GCS to extract the pack voltage from the BATTERY_STATUS messages.

@amilcarlucas
Copy link
Contributor

Very good idea!

@muramura
Copy link
Contributor

muramura commented Jul 24, 2018

If I do not have cell voltage information, I think that it is better to match MAVLINK specifications.
I think it would be better to set the value of UINT16_MAX in cell[1...9]..

http://mavlink.org/messages/common#BATTERY_STATUS

@WickedShell
Copy link
Contributor Author

@muramura That is what we currently do now. However how do you expect to get the pack voltage on the 2nd or 3rd battery in the system? I don't see any way to convey that information at the moment except cell voltages. It's also a bit less of a hack then it sounds like, as far as our monitor is concerned we only have one cell connected, it just happens to be a high voltage cell.

@muramura
Copy link
Contributor

muramura commented Jul 24, 2018

I understand.
In the case of a battery without cell voltage information, it is set by dividing each cell voltage with the maximum effective value.
I think it's a good idea.

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.

None yet

5 participants