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: minimum voltage option for aggregate monitors #114

Conversation

loki077
Copy link
Contributor

@loki077 loki077 commented Mar 7, 2024

O8 has left and right VTOL batteries, we are really interested in the minimum voltage between the two batteries instead of average voltage. The ESC battery monitor reports the average of the voltage of all connected ESCs.

This change will add option on BATT_Monitor to report ESC lowest voltage and not sum.

Testing is still pending to see the results.

SW-97

@loki077 loki077 force-pushed the feature/SW-97-add-option-for-vtol-battmon-to-report-min-voltage branch from 82a550f to ad09da0 Compare March 7, 2024 01:38
@robertlong13 robertlong13 self-assigned this May 7, 2024
@robertlong13 robertlong13 force-pushed the feature/SW-97-add-option-for-vtol-battmon-to-report-min-voltage branch from ad09da0 to a76d6ba Compare May 8, 2024 07:30
@robertlong13 robertlong13 changed the title WIP: ESC low voltage reporting BattMonitor: minimum voltage option for aggregate monitors May 8, 2024
@robertlong13
Copy link
Collaborator

I've fixed and reworked this PR a bit. The option now also applies both to "Sum" type monitors as well as "ESC" type. I also reserved the (1U<<7) option to make the upstream PR easier, since that option has been taken now.

I tested in SITL on a sum monitor, but this needs testing on an iron bird with an ESC monitor.

@robertlong13 robertlong13 requested review from a user and Pradeep-Carbonix and removed request for robertlong13 and Pradeep-Carbonix May 8, 2024 07:33
@robertlong13 robertlong13 added the needs upstream Upstream PR against ArduPilot needed label May 8, 2024
@ghost ghost requested a review from peterbarker May 8, 2024 23:35
@ghost
Copy link

ghost commented May 8, 2024

@Jono453 can you help with testing with it. Will need to emulate failure on CPN on iron bird without actually using ESC. We can discuss the test stages.

@robertlong13 robertlong13 force-pushed the feature/SW-97-add-option-for-vtol-battmon-to-report-min-voltage branch from 15f0f8a to 7938050 Compare May 16, 2024 07:49
loki077 and others added 2 commits June 12, 2024 10:59
Allows aggregate monitors like Sum and ESC to report the minimum voltage
instead of the average voltage. This is useful for systems with multiple
isolated batteries where the lowest voltage is the limiting factor.

SW-97
@Pradeep-Carbonix Pradeep-Carbonix force-pushed the feature/SW-97-add-option-for-vtol-battmon-to-report-min-voltage branch from 7938050 to 6944422 Compare June 12, 2024 00:59
@loki077
Copy link
Contributor Author

loki077 commented Jun 16, 2024

I have done the review of code. But can't approve it as I raised the PR @robertlong13 @Pradeep-Carbonix can you review and approve the PR.

@robertlong13
Copy link
Collaborator

I have done the review of code. But can't approve it as I raised the PR @robertlong13 @Pradeep-Carbonix can you review and approve the PR.

done

@loki077 loki077 merged commit df00855 into CxPilot Jun 16, 2024
62 checks passed
@robertlong13 robertlong13 deleted the feature/SW-97-add-option-for-vtol-battmon-to-report-min-voltage branch June 17, 2024 07:04
@robertlong13
Copy link
Collaborator

Upstream open (likely merge tomorrow): ArduPilot/ardupilot#28227

@robertlong13 robertlong13 removed the needs upstream Upstream PR against ArduPilot needed label Sep 30, 2024
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.

2 participants