Skip to content

Commit

Permalink
bat_sim: parameter for disabling battery simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
potaito authored and dagar committed Feb 6, 2024
1 parent 1917c13 commit a6fcb8e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ROMFS/px4fmu_common/init.d-posix/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit a6fcb8e

Please sign in to comment.