diff --git a/Source/sys-clk/overlay/Makefile b/Source/sys-clk/overlay/Makefile index d5540225..008c4b87 100644 --- a/Source/sys-clk/overlay/Makefile +++ b/Source/sys-clk/overlay/Makefile @@ -37,7 +37,7 @@ include ${TOPDIR}/lib/libultrahand/ultrahand.mk # version control constants #--------------------------------------------------------------------------------- #TARGET_VERSION := $(shell git describe --dirty --always --tags) -APP_VERSION := 0.23 +APP_VERSION := 0.22 TARGET_VERSION := $(APP_VERSION) #--------------------------------------------------------------------------------- diff --git a/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp index f921a2e5..086063d5 100644 --- a/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp @@ -43,7 +43,7 @@ std::string getVersionString() { char buf[0x100] = ""; Result rc = sysclkIpcGetVersionString(buf, sizeof(buf)); if (R_FAILED(rc) || buf[0] == '\0') { - return "Unknown"; + return "HorizonOC-Misc"; } return std::string(buf); } diff --git a/Source/sys-clk/overlay/src/ui/gui/base_gui.h b/Source/sys-clk/overlay/src/ui/gui/base_gui.h index eb0621b1..eac03aee 100644 --- a/Source/sys-clk/overlay/src/ui/gui/base_gui.h +++ b/Source/sys-clk/overlay/src/ui/gui/base_gui.h @@ -41,7 +41,7 @@ class BaseGui : public tsl::Gui public: BaseGui() {} ~BaseGui() {} - virtual void preDraw(tsl::gfx::Renderer* renderer); + virtual void preDraw(tsl::gfx::Renderer* renderer); void update() override; tsl::elm::Element* createUI() override; virtual tsl::elm::Element* baseUI() = 0; diff --git a/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp index e62bfbf4..16df6dd7 100644 --- a/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp @@ -148,27 +148,28 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) { y+=20; - renderer->drawString(labels[10], false, positions[2], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); + renderer->drawString(labels[10], false, positions[5], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); + renderer->drawString(labels[11], false, positions[6], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); renderer->drawString(displayStrings[20], false, dataPositions[0], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_Battery]); // Battery + renderer->drawString(displayStrings[22], false, dataPositions[1], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_PMIC]); // PMIC - renderer->drawString(labels[13], false, positions[4], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label + renderer->drawString(labels[13], false, positions[7], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label renderer->drawString(displayStrings[25], false, dataPositions[2], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // disp freq - renderer->drawString(labels[12], false, positions[3], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // fan label - - renderer->drawString(displayStrings[24], false, dataPositions[1], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // fan speed - y+=20; renderer->drawString(displayStrings[21], false, dataPositions[0], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // Bat voltage renderer->drawString(displayStrings[23], false, positions[2] - 2, y, SMALL_TEXT_SIZE, tsl::infoTextColor); // Bat Age + renderer->drawString(labels[12], false, positions[6], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // fan label + + renderer->drawString(displayStrings[24], false, dataPositions[1], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // fan speed renderer->drawString(displayStrings[26], false, dataPositions[2], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // disp volt - y+=20; + } // Optimized refresh - now does all the string formatting once per second @@ -267,12 +268,17 @@ void BaseMenuGui::refresh() sprintf(displayStrings[21], "%d mV", context->voltages[HocClkVoltage_Battery]); // BAT AVG + millis = context->temps[HorizonOCThermalSensor_PMIC]; // Battery + sprintf(displayStrings[22], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U); + tempColors[HorizonOCThermalSensor_PMIC] = tsl::GradientColor(millis * 0.001f); + sprintf(displayStrings[23], "%u%%", context->PartLoad[HocClkPartLoad_BAT] / 1000); sprintf(displayStrings[24], "%u%%", context->PartLoad[HocClkPartLoad_FAN]); sprintf(displayStrings[25], "%u Hz", context->realFreqs[HorizonOCModule_Display]); + sprintf(displayStrings[26], "%u.%u mV", context->voltages[HocClkVoltage_Display] / 1000U, context->voltages[HocClkVoltage_Display] % 1000U); //sprintf(displayStrings[26], "%u", context->speedos[HorizonOCSpeedo_CPU]); } diff --git a/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp index aa8bb42f..2df62d9a 100644 --- a/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp @@ -45,7 +45,7 @@ void MainGui::listUI() // this->lastContextUpdate = armGetSystemTick(); // this->context->enabled = state; // }); - // this->listElement->addItem(this->enabledToggle); +// this->listElement->addItem(this->enabledToggle); tsl::elm::ListItem* appProfileItem = new tsl::elm::ListItem("Edit App Profile"); appProfileItem->setClickListener([this](u64 keys) { diff --git a/Source/sys-clk/overlay/src/ui/gui/main_gui.h b/Source/sys-clk/overlay/src/ui/gui/main_gui.h index bf100679..77b98a2e 100644 --- a/Source/sys-clk/overlay/src/ui/gui/main_gui.h +++ b/Source/sys-clk/overlay/src/ui/gui/main_gui.h @@ -31,6 +31,9 @@ class MainGui : public BaseMenuGui { + protected: + tsl::elm::ToggleListItem* enabledToggle; + public: MainGui() {} ~MainGui() {}