mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-06 03:50:13 +02:00
MEB: Fix contactors incorrectly opening after 49 days. (#1308)
Fixed rollover millis bug (#1308)
This commit is contained in:
parent
917d27e134
commit
3c0928d7fc
1 changed files with 1 additions and 1 deletions
|
@ -1290,7 +1290,7 @@ void MebBattery::handle_incoming_can_frame(CAN_frame rx_frame) {
|
|||
|
||||
void MebBattery::transmit_can(unsigned long currentMillis) {
|
||||
|
||||
if (currentMillis > last_can_msg_timestamp + 500) {
|
||||
if (currentMillis - last_can_msg_timestamp > 500) {
|
||||
#ifdef DEBUG_LOG
|
||||
if (first_can_msg)
|
||||
logging.printf("MEB: No CAN msg received for 500ms\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue