Balancing quick fixes

allowed operating mode to be change when balancing is started, added lock mechanism to not leave balancing state when not enabled
This commit is contained in:
Markus Neukirch
2025-07-31 14:04:30 +02:00
parent ee3367eaec
commit dacce53625
4 changed files with 11 additions and 10 deletions

View File

@@ -400,7 +400,7 @@ HandleErrors();
CASE _iState OF
0: // Idle
// Start in normal mode
IF xEnable AND xAllModulesInAutoMode AND xRepairSwitchOk AND (NOT _xErrorInternal) THEN
IF (xEnable OR xStartBalancing) AND xAllModulesInAutoMode AND xRepairSwitchOk AND (NOT _xErrorInternal) THEN
_xEnable := TRUE;
CASE eOperationMode OF
@@ -412,6 +412,7 @@ CASE _iState OF
E_STRING_OPERATING_MODE.BALANCING:
_xStartBalancing := TRUE;
_xReleaseLimitErrorsInternal := FALSE;
_xEnable := FALSE;
_iState := 7;
// Safety check mode