Only leave TS_INACTIVE if SDC is closed
This commit is contained in:
parent
cf018f9e4a
commit
6d6c1c1f15
|
@ -51,10 +51,10 @@ void ts_sm_update() {
|
|||
}
|
||||
|
||||
TSState ts_sm_update_inactive() {
|
||||
if (ts_state.target_state == TS_ACTIVE) {
|
||||
if (ts_state.target_state == TS_ACTIVE && sdc_closed) {
|
||||
precharge_95_reached_timestamp = 0;
|
||||
return TS_PRECHARGE;
|
||||
} else if (ts_state.target_state == TS_CHARGING) {
|
||||
} else if (ts_state.target_state == TS_CHARGING && sdc_closed) {
|
||||
charging_check_timestamp = HAL_GetTick();
|
||||
return TS_CHARGING_CHECK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue