trying to be more efficient...

This commit is contained in:
Brett Christensen 2024-02-09 11:58:42 +11:00
parent 9f68296f5f
commit a928ed1cea
3 changed files with 53 additions and 30 deletions

View file

@ -54,6 +54,21 @@ static void update_led_color(EVENTS_ENUM_TYPE event) {
total_led_color = (total_led_color == RED) ? RED : entries[event].led_color;
}
const char* get_led_color_display_text(u_int8_t led_color) {
switch (led_color) {
case RED:
return "RED";
case YELLOW:
return "YELLOW";
case GREEN:
return "GREEN";
case BLUE:
return "BLUE";
default:
return "UNKNOWN";
}
}
const char* get_event_message(EVENTS_ENUM_TYPE event) {
switch (event) {
case EVENT_CAN_FAILURE: