mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 18:29:48 +02:00
Update TESLA-BATTERY.cpp
Change location of delay
This commit is contained in:
parent
3ef5bec6e2
commit
fc90d3eca9
1 changed files with 3 additions and 3 deletions
|
@ -1198,6 +1198,9 @@ the first, for a few cycles, then stop all messages which causes the contactor
|
||||||
|
|
||||||
unsigned long currentMillis = millis();
|
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 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 ((datalayer.system.status.inverter_allows_contactor_closing) && (datalayer.battery.status.bms_status != FAULT)) {
|
||||||
if (currentMillis - lastSend1CF >= 10) {
|
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)
|
#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
|
//Send 30ms message
|
||||||
if (currentMillis - previousMillis30 >= INTERVAL_30_MS) {
|
if (currentMillis - previousMillis30 >= INTERVAL_30_MS) {
|
||||||
// Check if sending of CAN messages has been delayed too much.
|
// Check if sending of CAN messages has been delayed too much.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue