mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
feat: add unread message count field to clock dashboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user