Fix compilation issue

This commit is contained in:
Daniel 2024-03-28 22:09:51 +02:00
parent df374d67ce
commit 25afbd82f9

View file

@ -7,7 +7,7 @@
/* Do not change code below unless you are sure what you are doing */
static unsigned long previousMillis100 = 0; // will store last time a 100ms CAN Message was send
static unsigned long previousMillis10ms = 0; // will store last time a 10s CAN Message was send
static unsigned long previousMillis10 = 0; // will store last time a 10s CAN Message was send
static uint8_t CANstillAlive = 12; //counter for checking if CAN is still alive
#define MAX_CELL_VOLTAGE 4250 //Battery is put into emergency stop if one cell goes over this value
@ -538,7 +538,7 @@ void send_can_battery() {
ESP32Can.CANWriteFrame(&KIA64_2A1);
}
// Send 10ms CAN Message
if (currentMillis - previousMillis10ms >= INTERVAL_10_MS) {
if (currentMillis - previousMillis10 >= INTERVAL_10_MS) {
// Check if sending of CAN messages has been delayed too much.
if ((currentMillis - previousMillis10 >= INTERVAL_10_MS_DELAYED) && (currentMillis > BOOTUP_TIME)) {
set_event(EVENT_CAN_OVERRUN, (currentMillis - previousMillis10));