Merge branch 'main' into mqtt-cleanup

This commit is contained in:
Brett Christensen 2024-02-13 18:57:54 +11:00
commit a74ae258c1
60 changed files with 1667 additions and 800 deletions

View file

@ -1,5 +1,6 @@
#include "ESP32CAN.h"
#include <Arduino.h>
#include "../../devboard/utils/events.h"
int ESP32CAN::CANInit() {
return CAN_init();
@ -12,13 +13,14 @@ int ESP32CAN::CANWriteFrame(const CAN_frame_t* p_frame) {
tx_ok = (result == 0) ? true : false;
if (tx_ok == false) {
Serial.println("CAN failure! Check wires");
LEDcolor = 3;
set_event(EVENT_CAN_TX_FAILURE, 0);
start_time = millis();
} else {
clear_event(EVENT_CAN_TX_FAILURE);
}
} else {
if ((millis() - start_time) >= 2000) {
tx_ok = true;
LEDcolor = 0;
}
}
return result;

View file

@ -3,7 +3,6 @@
#include "../../lib/miwagner-ESP32-Arduino-CAN/CAN.h"
#include "../../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
extern uint8_t LEDcolor;
class ESP32CAN {
public: