From e2f13e229212a4ab12d94d4f94a6b48ac87a9203 Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:32:03 +0100 Subject: [PATCH] MSG ui display fix --- zephcore/adapters/datastore/ZephyrDataStore.cpp | 6 +++--- zephcore/app/CompanionMesh.h | 2 ++ zephcore/helpers/ui/ui_mesh_actions.cpp | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/zephcore/adapters/datastore/ZephyrDataStore.cpp b/zephcore/adapters/datastore/ZephyrDataStore.cpp index 61fd334..a0e93fe 100644 --- a/zephcore/adapters/datastore/ZephyrDataStore.cpp +++ b/zephcore/adapters/datastore/ZephyrDataStore.cpp @@ -266,7 +266,7 @@ bool ZephyrDataStore::formatFileSystem() int rc; #if FIXED_PARTITION_EXISTS(lfs_partition) - rc = flash_area_open(FIXED_PARTITION_ID(lfs_partition), &fap); + rc = flash_area_open(PARTITION_ID(lfs_partition), &fap); if (rc == 0) { LOG_INF("Formatting LFS partition (%u bytes)", (unsigned)fap->fa_size); flash_area_flatten(fap, 0, fap->fa_size); @@ -275,7 +275,7 @@ bool ZephyrDataStore::formatFileSystem() #endif #if FIXED_PARTITION_EXISTS(storage_partition) - rc = flash_area_open(FIXED_PARTITION_ID(storage_partition), &fap); + rc = flash_area_open(PARTITION_ID(storage_partition), &fap); if (rc == 0) { LOG_INF("Formatting NVS storage (%u bytes)", (unsigned)fap->fa_size); flash_area_flatten(fap, 0, fap->fa_size); @@ -285,7 +285,7 @@ bool ZephyrDataStore::formatFileSystem() #if FIXED_PARTITION_EXISTS(qspi_storage_partition) /* QSPI if present (any platform) */ - rc = flash_area_open(FIXED_PARTITION_ID(qspi_storage_partition), &fap); + rc = flash_area_open(PARTITION_ID(qspi_storage_partition), &fap); if (rc == 0) { LOG_INF("Formatting QSPI (%u bytes, may take a while)", (unsigned)fap->fa_size); flash_area_flatten(fap, 0, fap->fa_size); diff --git a/zephcore/app/CompanionMesh.h b/zephcore/app/CompanionMesh.h index 706e93c..fb24901 100644 --- a/zephcore/app/CompanionMesh.h +++ b/zephcore/app/CompanionMesh.h @@ -110,6 +110,8 @@ public: void begin(); void loop(); + int getOfflineQueueCount() const { return _offline_queue_count; } + /** * Handle a protocol frame from BLE. * Returns true if frame was handled. diff --git a/zephcore/helpers/ui/ui_mesh_actions.cpp b/zephcore/helpers/ui/ui_mesh_actions.cpp index fb1cb60..5545e51 100644 --- a/zephcore/helpers/ui/ui_mesh_actions.cpp +++ b/zephcore/helpers/ui/ui_mesh_actions.cpp @@ -305,6 +305,9 @@ extern "C" void mesh_housekeeping_ui_refresh(void) } } + /* Update offline queue message count */ + ui_set_msg_count(s_mesh->getOfflineQueueCount()); + /* Trigger display refresh */ ui_refresh_display(); }