mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-06 03:50:13 +02:00
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:
parent
49d2bffe11
commit
8f6d583468
11 changed files with 84 additions and 55 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue