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

AP_BattMonitor: add option minimum volt option #28227

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

robertlong13
Copy link
Collaborator

Alternative approach to #28148

This solves the race condition issue and the Wh consumption calculation. Instead of calling update_consumed again, it sums the consumption calculation from the other monitors. This is actually much better than integrating it again manually, especially if the underlying monitors are better at calculating the consumption.

I also removed the implementation on the ESC battmon backend (and updated the param docs and comments to match). I don't think it was nearly as important to have this option for the ESC backend and I couldn't use the same trick with that one.

@IamPete1
Copy link
Member

it sums the consumption calculation from the other monitors

Your right, that does sound better, the only possible issue is the battery reset stuff. Just need to double check it does something sensible.

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Sep 25, 2024
@robertlong13
Copy link
Collaborator Author

@IamPete1 I have double checked that battery reset causes the consumptions to reset to zero. That's all you needed me to check, right?

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.

LGTM

@tridge tridge merged commit 11014ca into ArduPilot:master Oct 1, 2024
95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants