From fc90d3eca92857b19be0e84e61bf5bde628ae368 Mon Sep 17 00:00:00 2001 From: josiahhiggs <79869367+josiahhiggs@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:02:35 +1300 Subject: [PATCH] Update TESLA-BATTERY.cpp Change location of delay --- Software/src/battery/TESLA-BATTERY.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Software/src/battery/TESLA-BATTERY.cpp b/Software/src/battery/TESLA-BATTERY.cpp index 8decbee2..65257afe 100644 --- a/Software/src/battery/TESLA-BATTERY.cpp +++ b/Software/src/battery/TESLA-BATTERY.cpp @@ -1198,6 +1198,9 @@ the first, for a few cycles, then stop all messages which causes the contactor unsigned long currentMillis = millis(); + delay( + 3000); // adding 3s delay to allow cell voltage min/max to be read before transmit_can to stop false under/over cell voltage events. + #if defined(TESLA_MODEL_SX_BATTERY) || defined(EXP_TESLA_BMS_DIGITAL_HVIL) if ((datalayer.system.status.inverter_allows_contactor_closing) && (datalayer.battery.status.bms_status != FAULT)) { if (currentMillis - lastSend1CF >= 10) { @@ -1226,9 +1229,6 @@ the first, for a few cycles, then stop all messages which causes the contactor } #endif //defined(TESLA_MODEL_SX_BATTERY) || defined(EXP_TESLA_BMS_DIGITAL_HVIL) - delay( - 3000) // adding 3s delay to allow cell voltage min/max to be read before transmit_can to stop false under/over cell voltage events. - //Send 30ms message if (currentMillis - previousMillis30 >= INTERVAL_30_MS) { // Check if sending of CAN messages has been delayed too much.