Go into discharge for 5s

The discharge circuit is only active while the SDC is open. If the SDC
never opens (or opens for a very short time only), but we go to
TS_INACTIVE, then the discharge circuit will never be active. Going into
a discharge state for 5s allows the PDU to open the SDC for long enough
to reach <60V.
This commit is contained in:
2023-04-15 16:58:40 +02:00
parent 0b2010797e
commit 66d9baba7a
2 changed files with 13 additions and 3 deletions

View File

@ -9,6 +9,8 @@
#define MIN_VEHICLE_SIDE_VOLTAGE 150000 // mV
// Time to wait after reaching 95% of battery voltage before exiting precharge
#define PRECHARGE_95_DURATION 500 // ms
// Time to wait for discharge
#define DISCHARGE_DURATION 5000 // ms
// Time to wait after there is no more error condition before exiting TS_ERROR
#define NO_ERROR_TIME 1000 // ms
// Time to wait for charger voltage before going to TS_ERROR