From 78dd11c531cd3ae4ee61db9f70712d571924ddcc Mon Sep 17 00:00:00 2001 From: cmiguelrn Date: Fri, 19 Dec 2025 00:23:12 -0400 Subject: [PATCH 1/2] ws touch lcd2: show full short id --- main/ui/dashboard.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main/ui/dashboard.c b/main/ui/dashboard.c index b437b5db..86cd82c2 100644 --- a/main/ui/dashboard.c +++ b/main/ui/dashboard.c @@ -6,6 +6,8 @@ #include "process.h" #include "utils/malloc_ext.h" +#include + #ifdef CONFIG_BOARD_TYPE_JADE_ANY extern const uint8_t fccstart[] asm("_binary_fcc_bin_gz_start"); extern const uint8_t fccend[] asm("_binary_fcc_bin_gz_end"); @@ -62,7 +64,14 @@ gui_activity_t* make_home_screen_activity(const char* device_name, const char* f // NOTE: The home screen is created as an 'unmanaged' activity as // its lifetime is same as that of the entire application gui_activity_t* act = NULL; - gui_make_activity_ex(&act, true, device_name, false); +#ifdef CONFIG_BOARD_TYPE_WS_TOUCH_LCD2 + const char* const device_short_id = device_name + 5; // Skip "Jade " + JADE_ASSERT(strlen(device_short_id) == 6); + const char* const status_bar_title = device_short_id; +#else + const char* const status_bar_title = device_name; +#endif + gui_make_activity_ex(&act, true, status_bar_title, false); JADE_ASSERT(act); gui_view_node_t* node; From 817cba7d108eda9af78cf41ec4edd8fc4570cc60 Mon Sep 17 00:00:00 2001 From: cmiguelrn Date: Fri, 19 Dec 2025 00:43:48 -0400 Subject: [PATCH 2/2] ws touch lcd2: simplify short id title guard --- main/ui/dashboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main/ui/dashboard.c b/main/ui/dashboard.c index 86cd82c2..42664660 100644 --- a/main/ui/dashboard.c +++ b/main/ui/dashboard.c @@ -6,8 +6,6 @@ #include "process.h" #include "utils/malloc_ext.h" -#include - #ifdef CONFIG_BOARD_TYPE_JADE_ANY extern const uint8_t fccstart[] asm("_binary_fcc_bin_gz_start"); extern const uint8_t fccend[] asm("_binary_fcc_bin_gz_end"); @@ -65,9 +63,11 @@ gui_activity_t* make_home_screen_activity(const char* device_name, const char* f // its lifetime is same as that of the entire application gui_activity_t* act = NULL; #ifdef CONFIG_BOARD_TYPE_WS_TOUCH_LCD2 - const char* const device_short_id = device_name + 5; // Skip "Jade " - JADE_ASSERT(strlen(device_short_id) == 6); - const char* const status_bar_title = device_short_id; + const char* status_bar_title = device_name; + if (device_name && device_name[0] == 'J' && device_name[1] == 'a' && device_name[2] == 'd' + && device_name[3] == 'e' && device_name[4] == ' ' && device_name[11] == '\0') { + status_bar_title = device_name + 5; // Use just the short id if present + } #else const char* const status_bar_title = device_name; #endif