mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:23:34 +08:00
fix(battery_simulator): disable battery sim only if SIM_BAT_DRAIN strictly < 0
This commit is contained in:
@@ -249,7 +249,7 @@ fi
|
||||
|
||||
load_mon start
|
||||
|
||||
if param greater SIM_BAT_DRAIN 0
|
||||
if param greater SIM_BAT_DRAIN 0 || param compare SIM_BAT_DRAIN 0
|
||||
then
|
||||
battery_simulator start
|
||||
fi
|
||||
|
||||
@@ -6,7 +6,7 @@ parameters:
|
||||
description:
|
||||
short: Simulator Battery drain interval
|
||||
long: |-
|
||||
Set <= 0 to entirely disable the battery simulator.
|
||||
Set to -1 to entirely disable the battery simulator.
|
||||
This is useful when the battery is simulated externally and interfaced with PX4, for example through MAVLink.
|
||||
type: float
|
||||
default: 60
|
||||
|
||||
Reference in New Issue
Block a user