Set target state to INACTIVE when in DISCHARGE
This commit is contained in:
parent
7a5a28d056
commit
02fb39669a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue