joystick UI:

- track real RTC sync source on the joystick Time screen
- gate joystick-only UI helpers behind stub headers so non-joystick builds skip the extra code without #ifdef at every call site.
This commit is contained in:
liquidraver
2026-05-22 11:38:51 +02:00
parent 322460fa78
commit 094ea6e8a3
11 changed files with 130 additions and 153 deletions
-3
View File
@@ -4,7 +4,6 @@
*/
#include "CommonCLI.h"
#include <helpers/time_sync.h>
#include <helpers/TxtDataHelpers.h>
#include <helpers/AdvertDataHelpers.h>
#include <adapters/board/ZephyrBoard.h>
@@ -328,7 +327,6 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
uint32_t curr = getRTCClock()->getCurrentTime();
if (sender_timestamp > curr) {
getRTCClock()->setCurrentTime(sender_timestamp + 1);
time_sync_report(TIME_SYNC_CLI);
uint32_t now = getRTCClock()->getCurrentTime();
time_t t = (time_t)now;
struct tm *tm = gmtime(&t);
@@ -348,7 +346,6 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
uint32_t curr = getRTCClock()->getCurrentTime();
if (secs > curr) {
getRTCClock()->setCurrentTime(secs);
time_sync_report(TIME_SYNC_CLI);
time_t t = (time_t)secs;
struct tm *tm = gmtime(&t);
snprintf(reply, CLI_REPLY_SIZE, "OK - clock set: %02d:%02d - %d/%d/%d UTC",