Merge from main

This commit is contained in:
Jaakko Haakana 2025-07-02 19:09:01 +03:00
commit 2602316369
76 changed files with 128 additions and 107 deletions

View file

@ -174,7 +174,7 @@ void set_event_MQTTpublished(EVENTS_ENUM_TYPE event) {
events.entries[event].MQTTpublished = true;
}
const char* get_event_message_string(EVENTS_ENUM_TYPE event) {
String get_event_message_string(EVENTS_ENUM_TYPE event) {
switch (event) {
case EVENT_CANMCP2517FD_INIT_FAILURE:
return "CAN-FD initialization failed. Check hardware or bitrate settings";
@ -378,9 +378,10 @@ const char* get_event_message_string(EVENTS_ENUM_TYPE event) {
return "Failed to syncronise with the NTP Server. BMS will reset every 24 hours from when the emulator was "
"powered on";
case EVENT_GPIO_CONFLICT:
return "There is a GPIO pin conflict between SW components.";
return "There is a GPIO pin conflict between SW components: " + esp32hal->failed_allocator() + " / " +
esp32hal->conflicting_allocator();
case EVENT_GPIO_NOT_DEFINED:
return "SW module requires GPIO that is not defined for this hardware.";
return "SW module requires GPIO that is not defined for this hardware: " + esp32hal->failed_allocator();
default:
return "";
}
@ -417,10 +418,8 @@ static void set_event(EVENTS_ENUM_TYPE event, uint8_t data, bool latched) {
(events.entries[event].state != EVENT_STATE_ACTIVE_LATCHED)) {
events.entries[event].occurences++;
events.entries[event].MQTTpublished = false;
#ifdef DEBUG_LOG
logging.print("Event: ");
logging.println(get_event_message_string(event));
#endif
DEBUG_PRINTF("Event: %s\n", get_event_message_string(event).c_str());
}
// We should set the event, update event info