Implement Haruki's ClockRenderer and broadcast decomposeTime across various files. Attempt 2!

This commit is contained in:
Jason P
2025-10-14 08:09:12 -05:00
parent ee3c7f2272
commit c180f23026
7 changed files with 85 additions and 147 deletions

View File

@@ -3,6 +3,7 @@
#include "RTC.h"
#include "concurrency/OSThread.h"
#include "configuration.h"
#include "graphics/SharedUIDisplay.h"
#include "main.h"
#include "memGet.h"
#include "mesh/generated/meshtastic/mesh.pb.h"
@@ -128,9 +129,9 @@ void RedirectablePrint::log_to_serial(const char *logLevel, const char *format,
hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;
// Tear apart hms into h:m:s
int hour = hms / SEC_PER_HOUR;
int min = (hms % SEC_PER_HOUR) / SEC_PER_MIN;
int sec = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN
int hour, min, sec;
graphics::decomposeTime(rtc_sec, hour, min, sec);
#ifdef ARCH_PORTDUINO
::printf("%s ", logLevel);
if (color) {