Improvement: Make CAN events more readable (#823)

* Rename CAN events to make them simpler to debug

* Add buffer full check for MCP2515

* Add charger CAN missing event
This commit is contained in:
Daniel Öster 2025-01-27 18:35:53 +03:00 committed by GitHub
parent 49d2bffe11
commit 8f6d583468
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 84 additions and 55 deletions

View file

@ -15,10 +15,10 @@ int ESP32CAN::CANWriteFrame(const CAN_frame_t* p_frame) {
#ifdef DEBUG_VIA_USB
Serial.println("CAN failure! Check wires");
#endif
set_event(EVENT_CAN_TX_FAILURE, 0);
set_event(EVENT_CAN_NATIVE_TX_FAILURE, 0);
start_time = millis();
} else {
clear_event(EVENT_CAN_TX_FAILURE);
clear_event(EVENT_CAN_NATIVE_TX_FAILURE);
}
} else {
if ((millis() - start_time) >= 20) {