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

Extend use of AP_BATTERY_ENABLED #26106

Merged
merged 12 commits into from
Feb 6, 2024

Conversation

peterbarker
Copy link
Contributor

No description provided.

@amilcarlucas
Copy link
Contributor

Nice and modular, but what is the use case?
A vehicle without voltage measurement is a strange one :)

@peterbarker
Copy link
Contributor Author

Nice and modular, but what is the use case? A vehicle without voltage measurement is a strange one :)

Sid brought a PR to DevCall tonight which had to play games in the AP_Notify library because.... AP_Periph which can have a Notify device but not a battery monitor.

There are definitely many libraries we don't want on Periph (motors!), but I figured may as well get things working with our current boards.

This doesn't allow you to build anything but peripherals with the define disabled (AFAIK)!

It also helps point out where things should be grouped a bit, I think.

My goal with this PR is no-compiler-output-change-except-on-Periph-where-it-stops-nullptr-dereference

@peterbarker peterbarker force-pushed the pr/AP_BATTERY_ENABLED branch from ed03889 to cb45439 Compare January 31, 2024 21:19
@peterbarker
Copy link
Contributor Author

------------------------  ---------  --------------  -----  ------  ----  -----  -----  ---
Board                     AP_Periph  antennatracker  blimp  copter  heli  plane  rover  sub
ARK_CANNODE               -216
ARK_GPS                   -216
ARK_RTK_GPS               -216
AeroFox-GNSS_F9P          -208
FreeflyRTK                -208
Here4AP                   -200
HerePro                   -360
HolybroG4_GPS             -216
HolybroGPS                -208
MatekL431-DShot           -208
MatekL431-GPS             0
MatekL431-RC              -208
MatekL431-bdshot          -208
SITL_arm_linux_gnueabihf             0               0      0       0     0      0      0
SITL_x86_64_linux_gnu                0               0      0       0     0      0      0
Sierra-F405               -208
Sierra-F412               -216
Sierra-F9P                -208
Sierra-PrecisionPoint     -208
Sierra-TrueNavPro         -208
f303-MatekGPS             0
rGNSS                     -208
sw-nav-f405               -208
------------------------  ---------  --------------  -----  ------  ----  -----  -----  ---

@peterbarker
Copy link
Contributor Author

I've run this through size_compare_branches.py.

Changes are limited to several periph which include code which contained a nullptr dereference:
image

Other periphs have minor changes to their linking.

@peterbarker peterbarker changed the title Add and use AP_BATTERY_ENABLED Extend use of AP_BATTERY_ENABLED Feb 2, 2024
@tridge tridge merged commit b1ddbe9 into ArduPilot:master Feb 6, 2024
93 checks passed
@peterbarker peterbarker deleted the pr/AP_BATTERY_ENABLED branch February 6, 2024 00:15
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.

4 participants