refactor(battery_simulator): clean up param SIM_BAT_ENABLE (#26823)

* refactor(battery_simulator): remove SIM_BAT_ENABLE

disable instead with SIM_BAT_DRAIN <= 0

* fix(battery_simulator): disable battery sim only if SIM_BAT_DRAIN strictly < 0

* fix(battery_simulator): disable if 0, adjust limit to 0

* fix(battery_simulator): remove constraining again

now that SIM_BAT_DRAIN=0 means the module is not started we are safe
from division by zero again (param compare has a tolerance of 1e-7)

* fix(battery_simulator): constrain param to min of 1

to avoid division by zero.

This reverts commit 6380c4fdee.

* fix(battery_simulator): remove arbitrary param max

* fix(battery_simulator): reword long param description

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* fix(battery_simulator): reword short param description

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
This commit is contained in:
Balduin
2026-04-13 02:20:46 +02:00
committed by GitHub
parent 6ae4e8a05d
commit c970a822a0
4 changed files with 8 additions and 15 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ fi
load_mon start
if param compare SIM_BAT_ENABLE 1
if param greater SIM_BAT_DRAIN 0
then
battery_simulator start
fi