bat_sim: parameter for disabling battery simulator

This commit is contained in:
Alessandro Simovic 2024-02-01 14:14:44 +01:00 committed by Daniel Agar
parent 1917c138f7
commit a6fcb8ef1e
2 changed files with 18 additions and 1 deletions

View File

@ -248,7 +248,12 @@ then
fi
load_mon start
battery_simulator start
if param compare SIM_BAT_ENABLE 1
then
battery_simulator start
fi
tone_alarm start
rc_update start
manual_control start

View File

@ -31,6 +31,18 @@
*
****************************************************************************/
/**
* Simulator Battery enabled
*
* Enable or disable the internal battery simulation. This is useful
* when the battery is simulated externally and interfaced with PX4
* through MAVLink for example.
*
* @boolean
* @group SITL
*/
PARAM_DEFINE_INT32(SIM_BAT_ENABLE, 1);
/**
* Simulator Battery drain interval
*