Files
PX4-Autopilot/docs
Anil Kircaliali ed772c0c3d feat(battery_simulator): simulate up to 3 battery instances (#28385)
* feat(battery_simulator): simulate all battery instances with per-battery drain

Simulate one battery per battery_status instance instead of a single
hardcoded one. The Battery array is constructed in place from
battery_status_s::MAX_INSTANCES, so the simulator follows the maximum
number of batteries without code changes. A battery is only published
when its BAT<N>_SOURCE is set to power module, which keeps the default
SITL behavior of a single battery unchanged.

Add SIM_BAT<N>_DRAIN and SIM_BAT<N>_MIN_PCT to override the shared
SIM_BAT_DRAIN and SIM_BAT_MIN_PCT per battery (-1 inherits the shared
value), and integrate the state of charge per battery. This allows
testing multi-battery behavior such as one battery draining faster
than the others.

* docs(simulation): describe simulating multiple batteries

Document how additional simulated batteries are enabled through
BAT<N>_SOURCE and how SIM_BAT<N>_DRAIN and SIM_BAT<N>_MIN_PCT override
the shared drain parameters per battery.

* docs(simulation): clarify per-battery fallback rules
2026-09-01 09:09:37 +02:00
..
2026-09-01 06:13:20 +00:00
…
…
…
…
…
…

PX4 User Guide

This repo contains the source code for the PX4 User Guide.

Note

Contributions and Translations to this guide are very welcome!