diff --git a/examples/companion_radio/ui-new/DashboardConfigScreen.h b/examples/companion_radio/ui-new/DashboardConfigScreen.h index 23fa962e..f587c6d5 100644 --- a/examples/companion_radio/ui-new/DashboardConfigScreen.h +++ b/examples/companion_radio/ui-new/DashboardConfigScreen.h @@ -13,7 +13,8 @@ static const uint8_t DASH_ALT = 6; static const uint8_t DASH_LUX = 7; static const uint8_t DASH_CO2 = 8; static const uint8_t DASH_NODES = 9; -static const uint8_t DASH_COUNT = 10; +static const uint8_t DASH_MSGS = 10; +static const uint8_t DASH_COUNT = 11; class DashboardConfigScreen : public UIScreen { UITask* _task; @@ -84,5 +85,5 @@ public: const char* DashboardConfigScreen::OPTION_NAMES[DASH_COUNT] = { "None", "Battery", "Temp", "Humidity", "Pressure", - "GPS", "Altitude", "Lux", "CO2", "Contacts" + "GPS", "Altitude", "Lux", "CO2", "Contacts", "Messages" }; diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 53795963..edabeaf5 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -1904,6 +1904,10 @@ public: } else if (field == DASH_NODES) { strcpy(label, "Nodes"); snprintf(val, sizeof(val), "%d", the_mesh.getNumContacts()); + } else if (field == DASH_MSGS) { + strcpy(label, "Msgs"); + int unread = _task->getDMUnreadTotal() + _task->getChannelUnreadCount() + _task->getRoomUnreadCount(); + snprintf(val, sizeof(val), "%d", unread); } else { uint8_t lpp_type = 0; switch (field) {