Skip to content

Commit

Permalink
Add startup delay for contactors (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
dalathegreat authored Dec 15, 2024
1 parent c7e0d96 commit e71ca81
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Software/Software.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e71ca81

Please sign in to comment.