Add startup delay for contactors (#673)

This commit is contained in:
Daniel Öster 2024-12-15 14:07:58 +02:00 committed by GitHub
parent c7e0d968bb
commit e71ca81feb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -827,6 +827,13 @@ void handle_contactors() {
}
unsigned long currentTime = millis();
if (currentTime < INTERVAL_10_S) {
// Skip running the state machine before system has started up.
// Gives the system some time to detect any faults from battery before blindly just engaging the contactors
return;
}
// Handle actual state machine. This first turns on Negative, then Precharge, then Positive, and finally turns OFF precharge
switch (contactorStatus) {
case START_PRECHARGE: