Set target state to INACTIVE when in DISCHARGE

This commit is contained in:
Jasper Blanckenburg 2024-07-17 16:38:10 +02:00
parent 7a5a28d056
commit 02fb39669a
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ TSState ts_sm_update_precharge() {
TSState ts_sm_update_discharge() {
if (HAL_GetTick() - discharge_begin_timestamp >= DISCHARGE_DURATION) {
ts_state.target_state = TS_INACTIVE;
return TS_INACTIVE;
} else {
return TS_DISCHARGE;