hoc-clk: make logging toggle config based

This commit is contained in:
Lightos1 committed 2026-10-17 19:18:24 +02:00
1 parent abfe4774a3
commit 2fd78d6c30
6 files changed
+82 -29

No files matched your search

@@ -560,6 +560,18 @@ std::vector<std::string> ConfigInfoStrings(HocClkConfigValue val, bool isMariko,
"Voltage applies globally across all frequencies.",
"\"Reset\" restores default or RAM-stable minimum."
};
case HocClkConfigValue_FileLogging:
return {
"Write sysmodule logs to log.txt in the config folder.",
"Takes effect after a reboot.",
"Default: Off"
};
case HocClkConfigValue_UartLogging:
return {
"Output sysmodule logs over UART.",
"Takes effect after a reboot.",
"Default: Off"
};
default:
return {};
}
@@ -806,6 +806,13 @@ class GeneralSettingsSubMenuGui : public MiscGui {
addConfigButton(HocClkConfigValue_PollingIntervalMs, "Polling Interval", ValueRange(50, 1000, 50, "ms", 1), "Polling Interval",
&thresholdsDisabled, {}, {}, false);
tsl::elm::CustomDrawer *loggingSpacer = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *, s32, s32, s32, s32) {});
loggingSpacer->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 12);
this->listElement->addItem(loggingSpacer);
this->listElement->addItem(new CompactCategoryHeader("Logging"));
addConfigToggle(HocClkConfigValue_FileLogging, nullptr);
addConfigToggle(HocClkConfigValue_UartLogging, nullptr);
tsl::elm::CustomDrawer *exSetWarning = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
renderer->drawString("\uE150 Experimental Settings are incomplete ", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
renderer->drawString("and may not work correctly or at all!", false, x + 20, y + 50, 18, tsl::style::color::ColorText);