mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 19:42:08 +02:00
Add startup delay for contactors (#673)
This commit is contained in:
parent
c7e0d968bb
commit
e71ca81feb
1 changed files with 7 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue