From 04978d8ae986c7145b0b4f38e969111976da879c Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sun, 5 Jul 2026 11:03:40 +0200 Subject: [PATCH] feat(tools): add Clock Tools entry to Tools > System Surfaces the Alarm/Timer/Stopwatch screen (previously reachable only from the home Clock page) as a System tool, via the existing UITask::gotoClockTools() and ICON_ALARM. Co-Authored-By: Claude Opus 4.8 --- examples/companion_radio/ui-new/ToolsScreen.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/companion_radio/ui-new/ToolsScreen.h b/examples/companion_radio/ui-new/ToolsScreen.h index 9f15a27a..4af94e3a 100644 --- a/examples/companion_radio/ui-new/ToolsScreen.h +++ b/examples/companion_radio/ui-new/ToolsScreen.h @@ -15,7 +15,7 @@ class ToolsScreen : public UIScreen { enum Action { ACT_NEARBY, ACT_LIVESHARE, ACT_TRAIL, ACT_LOCATOR, ACT_COMPASS, ACT_BOT, ACT_AUTOADVERT, ACT_REPEATER, - ACT_RINGTONE, ACT_DIAGNOSTICS + ACT_CLOCK, ACT_RINGTONE, ACT_DIAGNOSTICS }; struct Tool { const char* label; const MiniIcon* icon; Action action; }; struct Section { const char* name; const MiniIcon* icon; const Tool* tools; uint8_t count; }; @@ -49,6 +49,7 @@ class ToolsScreen : public UIScreen { case ACT_BOT: _task->gotoBotScreen(); break; case ACT_AUTOADVERT: _task->gotoAutoAdvertScreen(); break; case ACT_REPEATER: _task->gotoRepeaterScreen(); break; + case ACT_CLOCK: _task->gotoClockTools(); break; case ACT_RINGTONE: _task->gotoRingtoneEditor(); break; case ACT_DIAGNOSTICS: _task->gotoDiagnosticsScreen(); break; } @@ -122,11 +123,12 @@ const ToolsScreen::Tool ToolsScreen::COMMS_TOOLS[] = { { "Repeater", &ICON_REPEATER, ACT_REPEATER }, }; const ToolsScreen::Tool ToolsScreen::SYSTEM_TOOLS[] = { + { "Clock Tools", &ICON_ALARM, ACT_CLOCK }, { "Ringtone Editor", &ICON_NOTE, ACT_RINGTONE }, { "Diagnostics", &ICON_CHART, ACT_DIAGNOSTICS }, }; const ToolsScreen::Section ToolsScreen::SECTIONS[] = { { "Location", &ICON_MAP_CONTACT, LOCATION_TOOLS, 5 }, { "Comms", &ICON_ADVERT, COMMS_TOOLS, 3 }, - { "System", &ICON_GEAR, SYSTEM_TOOLS, 2 }, + { "System", &ICON_GEAR, SYSTEM_TOOLS, 3 }, };