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

bat_sim: parameter for disabling battery simulator #22710

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading