monitor: make hoc-monitor build properly

This commit is contained in:
souldbminersmwc
2025-12-19 20:39:57 -05:00
parent 414faddd7a
commit e4e0b0b806
19 changed files with 159 additions and 508 deletions

View File

@@ -37,8 +37,8 @@ include $(DEVKITPRO)/libnx/switch_rules
# of a homebrew executable (.nro). This is intended to be used for sysmodules.
# NACP building is skipped as well.
#---------------------------------------------------------------------------------
APP_TITLE := Status Monitor
APP_VERSION := 1.3.2+r3
APP_TITLE := Horizon OC Monitor
APP_VERSION := 1.3.2+r3-hoc
TARGET := $(notdir $(CURDIR))
BUILD := build
SOURCES := source

View File

@@ -1,126 +0,0 @@
/*
* --------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <p-sam@d3vs.net>, <natinusala@gmail.com>, <m4x@m4xw.net>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If you meet any of us some day, and you think this
* stuff is worth it, you can buy us a beer in return. - The sys-clk authors
* --------------------------------------------------------------------------
*/
#pragma once
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
typedef enum
{
SysClkSocType_Erista = 0,
SysClkSocType_Mariko,
SysClkSocType_EnumMax
} SysClkSocType;
typedef enum
{
SysClkProfile_Handheld = 0,
SysClkProfile_HandheldCharging,
SysClkProfile_HandheldChargingUSB,
SysClkProfile_HandheldChargingOfficial,
SysClkProfile_Docked,
SysClkProfile_EnumMax
} SysClkProfile;
typedef enum
{
SysClkModule_CPU = 0,
SysClkModule_GPU,
SysClkModule_MEM,
SysClkModule_EnumMax
} SysClkModule;
typedef enum
{
SysClkThermalSensor_SOC = 0,
SysClkThermalSensor_PCB,
SysClkThermalSensor_Skin,
SysClkThermalSensor_EnumMax
} SysClkThermalSensor;
typedef enum
{
SysClkPowerSensor_Now = 0,
SysClkPowerSensor_Avg,
SysClkPowerSensor_EnumMax
} SysClkPowerSensor;
typedef enum
{
SysClkRamLoad_All = 0,
SysClkRamLoad_Cpu,
SysClkRamLoad_EnumMax
} SysClkRamLoad;
#define SYSCLK_ENUM_VALID(n, v) ((v) < n##_EnumMax)
static inline const char* sysclkFormatModule(SysClkModule module, bool pretty)
{
switch(module)
{
case SysClkModule_CPU:
return pretty ? "CPU" : "cpu";
case SysClkModule_GPU:
return pretty ? "GPU" : "gpu";
case SysClkModule_MEM:
return pretty ? "Memory" : "mem";
default:
return NULL;
}
}
static inline const char* sysclkFormatThermalSensor(SysClkThermalSensor thermSensor, bool pretty)
{
switch(thermSensor)
{
case SysClkThermalSensor_SOC:
return pretty ? "SOC" : "soc";
case SysClkThermalSensor_PCB:
return pretty ? "PCB" : "pcb";
case SysClkThermalSensor_Skin:
return pretty ? "Skin" : "skin";
default:
return NULL;
}
}
static inline const char* sysclkFormatPowerSensor(SysClkPowerSensor powSensor, bool pretty)
{
switch(powSensor)
{
case SysClkPowerSensor_Now:
return pretty ? "Now" : "now";
case SysClkPowerSensor_Avg:
return pretty ? "Avg" : "avg";
default:
return NULL;
}
}
static inline const char* sysclkFormatProfile(SysClkProfile profile, bool pretty)
{
switch(profile)
{
case SysClkProfile_Docked:
return pretty ? "Docked" : "docked";
case SysClkProfile_Handheld:
return pretty ? "Handheld" : "handheld";
case SysClkProfile_HandheldCharging:
return pretty ? "Charging" : "handheld_charging";
case SysClkProfile_HandheldChargingUSB:
return pretty ? "USB Charger" : "handheld_charging_usb";
case SysClkProfile_HandheldChargingOfficial:
return pretty ? "Official Charger" : "handheld_charging_official";
default:
return NULL;
}
}

View File

@@ -1,38 +0,0 @@
/*
* --------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <p-sam@d3vs.net>, <natinusala@gmail.com>, <m4x@m4xw.net>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If you meet any of us some day, and you think this
* stuff is worth it, you can buy us a beer in return. - The sys-clk authors
* --------------------------------------------------------------------------
*/
#pragma once
#include "types.h"
#include "../config.h"
#include "../board.h"
#include "../ipc.h"
bool sysclkIpcRunning();
Result sysclkIpcInitialize(void);
void sysclkIpcExit(void);
Result sysclkIpcGetAPIVersion(u32* out_ver);
Result sysclkIpcGetVersionString(char* out, size_t len);
Result sysclkIpcGetCurrentContext(SysClkContext* out_context);
Result sysclkIpcGetProfileCount(u64 tid, u8* out_count);
Result sysclkIpcSetEnabled(bool enabled);
Result sysclkIpcExitCmd();
Result sysclkIpcSetOverride(SysClkModule module, u32 hz);
Result sysclkIpcGetProfiles(u64 tid, SysClkTitleProfileList* out_profiles);
Result sysclkIpcSetProfiles(u64 tid, SysClkTitleProfileList* profiles);
Result sysclkIpcGetConfigValues(SysClkConfigValueList* out_configValues);
Result sysclkIpcSetConfigValues(SysClkConfigValueList* configValues);
Result sysclkIpcGetFreqList(SysClkModule module, u32* list, u32 maxCount, u32* outCount);
static inline Result sysclkIpcRemoveOverride(SysClkModule module)
{
return sysclkIpcSetOverride(module, 0);
}

View File

@@ -1,29 +0,0 @@
/*
* --------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <p-sam@d3vs.net>, <natinusala@gmail.com>, <m4x@m4xw.net>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If you meet any of us some day, and you think this
* stuff is worth it, you can buy us a beer in return. - The sys-clk authors
* --------------------------------------------------------------------------
*/
#pragma once
#ifdef __SWITCH__
#include <switch/types.h>
#include <switch/result.h>
#else
#define R_FAILED(res) ((res) != 0)
#define R_SUCCEEDED(res) ((res) == 0)
typedef std::uint32_t Result;
typedef std::uint32_t u32;
typedef std::int32_t s32;
typedef std::uint64_t u64;
typedef std::uint8_t u8;
#endif

View File

@@ -1,51 +0,0 @@
/*
* --------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <p-sam@d3vs.net>, <natinusala@gmail.com>, <m4x@m4xw.net>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If you meet any of us some day, and you think this
* stuff is worth it, you can buy us a beer in return. - The sys-clk authors
* --------------------------------------------------------------------------
*/
#pragma once
#include <stdint.h>
#include "board.h"
typedef struct
{
uint8_t enabled;
uint64_t applicationId;
SysClkProfile profile;
uint32_t freqs[SysClkModule_EnumMax];
uint32_t realFreqs[SysClkModule_EnumMax];
uint32_t overrideFreqs[SysClkModule_EnumMax];
uint32_t temps[SysClkThermalSensor_EnumMax];
int32_t power[SysClkPowerSensor_EnumMax];
uint32_t ramLoad[SysClkRamLoad_EnumMax];
uint32_t realVolts[4];
uint32_t perfConfId;
SysClkProfile realProfile;
int32_t reserved[5];
uint32_t reserved2;
} SysClkContext;
#ifdef __cplusplus
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
#endif
typedef struct
{
union {
uint32_t mhz[SysClkProfile_EnumMax * SysClkModule_EnumMax];
uint32_t mhzMap[SysClkProfile_EnumMax][SysClkModule_EnumMax];
};
} SysClkTitleProfileList;
#ifdef __cplusplus
#pragma GCC diagnostic pop
#endif
#define SYSCLK_FREQ_LIST_MAX 32

View File

@@ -1,78 +0,0 @@
/*
* --------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <p-sam@d3vs.net>, <natinusala@gmail.com>, <m4x@m4xw.net>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If you meet any of us some day, and you think this
* stuff is worth it, you can buy us a beer in return. - The sys-clk authors
* --------------------------------------------------------------------------
*/
#pragma once
#include <stdint.h>
#include <stddef.h>
typedef enum {
SysClkConfigValue_PollingIntervalMs = 0,
SysClkConfigValue_TempLogIntervalMs,
SysClkConfigValue_FreqLogIntervalMs,
SysClkConfigValue_PowerLogIntervalMs,
SysClkConfigValue_CsvWriteIntervalMs,
SysClkConfigValue_EnumMax,
} SysClkConfigValue;
typedef struct {
uint64_t values[SysClkConfigValue_EnumMax];
} SysClkConfigValueList;
static inline const char* sysclkFormatConfigValue(SysClkConfigValue val, bool pretty)
{
switch(val)
{
case SysClkConfigValue_PollingIntervalMs:
return pretty ? "Polling Interval (ms)" : "poll_interval_ms";
case SysClkConfigValue_TempLogIntervalMs:
return pretty ? "Temperature logging interval (ms)" : "temp_log_interval_ms";
case SysClkConfigValue_FreqLogIntervalMs:
return pretty ? "Frequency logging interval (ms)" : "freq_log_interval_ms";
case SysClkConfigValue_PowerLogIntervalMs:
return pretty ? "Power logging interval (ms)" : "power_log_interval_ms";
case SysClkConfigValue_CsvWriteIntervalMs:
return pretty ? "CSV write interval (ms)" : "csv_write_interval_ms";
default:
return NULL;
}
}
static inline uint64_t sysclkDefaultConfigValue(SysClkConfigValue val)
{
switch(val)
{
case SysClkConfigValue_PollingIntervalMs:
return 300ULL;
case SysClkConfigValue_TempLogIntervalMs:
case SysClkConfigValue_FreqLogIntervalMs:
case SysClkConfigValue_PowerLogIntervalMs:
case SysClkConfigValue_CsvWriteIntervalMs:
return 0ULL;
default:
return 0ULL;
}
}
static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t input)
{
switch(val)
{
case SysClkConfigValue_PollingIntervalMs:
return input > 0;
case SysClkConfigValue_TempLogIntervalMs:
case SysClkConfigValue_FreqLogIntervalMs:
case SysClkConfigValue_PowerLogIntervalMs:
case SysClkConfigValue_CsvWriteIntervalMs:
return input >= 0;
default:
return false;
}
}

View File

@@ -1,53 +0,0 @@
/*
* --------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <p-sam@d3vs.net>, <natinusala@gmail.com>, <m4x@m4xw.net>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If you meet any of us some day, and you think this
* stuff is worth it, you can buy us a beer in return. - The sys-clk authors
* --------------------------------------------------------------------------
*/
#pragma once
#include <stdint.h>
#include "board.h"
#include "clock_manager.h"
#define SYSCLK_IPC_API_VERSION 4
#define SYSCLK_IPC_SERVICE_NAME "sys:clk"
enum SysClkIpcCmd
{
SysClkIpcCmd_GetApiVersion = 0,
SysClkIpcCmd_GetVersionString = 1,
SysClkIpcCmd_GetCurrentContext = 2,
SysClkIpcCmd_Exit = 3,
SysClkIpcCmd_GetProfileCount = 4,
SysClkIpcCmd_GetProfiles = 5,
SysClkIpcCmd_SetProfiles = 6,
SysClkIpcCmd_SetEnabled = 7,
SysClkIpcCmd_SetOverride = 8,
SysClkIpcCmd_GetConfigValues = 9,
SysClkIpcCmd_SetConfigValues = 10,
SysClkIpcCmd_GetFreqList = 11,
};
typedef struct
{
uint64_t tid;
SysClkTitleProfileList profiles;
} SysClkIpc_SetProfiles_Args;
typedef struct
{
SysClkModule module;
uint32_t hz;
} SysClkIpc_SetOverride_Args;
typedef struct
{
SysClkModule module;
uint32_t maxCount;
} SysClkIpc_GetFreqList_Args;

View File

@@ -0,0 +1,127 @@
[status-monitor]
battery_avg_iir_filter=false
battery_time_left_refreshrate=60
average_gpu_load=false
use_old_fps_average=false
[full]
refresh_rate=1
layer_width_align=left
show_real_freqs=true
show_deltas=true
show_target_freqs=true
show_fps=true
show_res=true
show_read_speed=true
use_dynamic_colors=true
disable_screenshots=false
separator_color=#888F
cat_color_1=#8FFF
cat_color_2=#8CFF
text_color=#FFFF
[mini]
refresh_rate=1
handheld_font_size=15
docked_font_size=15
spacing=8
real_freqs=true
real_volts=true
show_full_cpu=false
show_full_res=true
show_fan_percentage=true
show_soc_voltage=false
use_dynamic_colors=true
show_vddq=false
show_vdd2=true
decimal_vdd2=false
show_dtc=true
use_dtc_symbol=true
dtc_format=%m-%d-%Y%H:%M:%S
show=DTC+BAT+CPU+GPU+RAM+TMP+FPS+RES
replace_MB_with_RAM_load=true
show_RAM_load_CPU_GPU=false
invert_battery_display=true
disable_screenshots=false
sleep_exit=false
frame_offset_x=10
frame_offset_y=10
frame_padding=10
background_color=#0009
focus_background_color=#000F
separator_color=#888F
cat_color=#2DFF
text_color=#FFFF
[micro]
refresh_rate=1
layer_height_align=top
handheld_font_size=15
docked_font_size=15
text_align=center
real_freqs=true
real_volts=true
show_full_cpu=false
show_full_res=false
show_soc_voltage=true
use_dynamic_colors=true
show_vddq=false
show_vdd2=true
decimal_vdd2=false
show_dtc=true
use_dtc_symbol=true
dtc_format=%H:%M:%S
show=FPS+CPU+GPU+RAM+SOC+BAT+DTC
replace_GB_with_RAM_load=true
invert_battery_display=false
disable_screenshots=false
sleep_exit=false
background_color=#0009
separator_color=#888F
cat_color=#2DFF
text_color=#FFFF
[fps-counter]
refresh_rate=30
handheld_font_size=40
docked_font_size=40
use_integer_counter=false
disable_screenshots=false
frame_offset_x=10
frame_offset_y=10
frame_padding=10
background_color=#0009
focus_background_color=#000F
text_color=#8CFF
[fps-graph]
refresh_rate=30
show_info=false
use_dynamic_colors=true
disable_screenshots=false
frame_offset_x=10
frame_offset_y=10
frame_padding=10
background_color=#0009
focus_background_color=#000F
fps_counter_color=#888C
border_color=#2DFF
dashed_line_color=#8888
main_line_color=#FFFF
rounded_line_color=#F0FF
perfect_line_color=#0C0F
max_fps_text_color=#FFFF
min_fps_text_color=#FFFF
text_color=#FFFF
cat_color=#0F0F
[game_resolutions]
refresh_rate=10
disable_screenshots=false
frame_offset_x=10
frame_offset_y=10
frame_padding=10
background_color=#0009
focus_background_color=#000F
cat_color=#8FFF
text_color=#FFFF

View File

@@ -221,7 +221,7 @@ uint64_t lastFrameNumber = 0;
uint32_t realCPU_Hz = 0;
uint32_t realGPU_Hz = 0;
uint32_t realRAM_Hz = 0;
uint32_t ramLoad[SysClkRamLoad_EnumMax];
uint32_t ramLoad[SysClkPartLoad_EnumMax];
uint32_t realCPU_mV = 0;
uint32_t realGPU_mV = 0;
uint32_t realRAM_mV = 0;
@@ -515,8 +515,7 @@ std::string getVersionString() {
bool usingEOS() {
const std::string versionString = getVersionString();
return versionString.find("eos") != std::string::npos;
return true;
}
// === ULTRA-FAST VOLTAGE READING ===
@@ -576,66 +575,15 @@ void Misc(void*) {
realGPU_Hz = sysclkCTX.realFreqs[SysClkModule_GPU];
realRAM_Hz = sysclkCTX.realFreqs[SysClkModule_MEM];
ramLoad[SysClkPartLoad_EMC] = sysclkCTX.PartLoad[SysClkPartLoad_EMC];
ramLoad[SysClkPartLoad_EMCCpu] = sysclkCTX.ramLoad[SysClkPartLoad_EMCCpu];
ramLoad[SysClkPartLoad_EMCCpu] = sysclkCTX.PartLoad[SysClkPartLoad_EMCCpu];
realCPU_mV = sysclkCTX.voltages[HocClkVoltage_CPU];
realGPU_mV = sysclkCTX.realVolts[HocClkVoltage_GPU];
realRAM_mV = sysclkCTX.realVolts[HocClkVoltage_EMCVDD2];
realSOC_mV = sysclkCTX.realVolts[HocClkVoltage_SOC];
realGPU_mV = sysclkCTX.voltages[HocClkVoltage_GPU];
realRAM_mV = sysclkCTX.voltages[HocClkVoltage_EMCVDDQ_MarikoOnly];
realSOC_mV = sysclkCTX.voltages[HocClkVoltage_SOC];
}
}
// Read voltages directly if not using EOS
if (canReadVoltages) {
RgltrSession session;
u32 vdd2_raw = 0, vddq_raw = 0;
// CPU voltage
if (R_SUCCEEDED(rgltrOpenSession(&session, PcvPowerDomainId_Max77621_Cpu))) {
if (R_FAILED(rgltrGetVoltage(&session, &realCPU_mV))) {
realCPU_mV = 0;
}
rgltrCloseSession(&session);
}
// GPU voltage
if (R_SUCCEEDED(rgltrOpenSession(&session, PcvPowerDomainId_Max77621_Gpu))) {
if (R_FAILED(rgltrGetVoltage(&session, &realGPU_mV))) {
realGPU_mV = 0;
}
rgltrCloseSession(&session);
}
// SOC voltage
if (R_SUCCEEDED(rgltrOpenSession(&session, PcvPowerDomainId_Max77620_Sd0))) {
if (R_FAILED(rgltrGetVoltage(&session, &realSOC_mV))) {
realSOC_mV = 0;
}
rgltrCloseSession(&session);
}
// VDD2 (DRAM)
if (R_SUCCEEDED(rgltrOpenSession(&session, PcvPowerDomainId_Max77812_Dram))) {
if (R_FAILED(rgltrGetVoltage(&session, &vdd2_raw))) {
vdd2_raw = 0;
}
rgltrCloseSession(&session);
}
// VDDQ
if (R_SUCCEEDED(rgltrOpenSession(&session, PcvPowerDomainId_Max77620_Sd1))) {
if (R_FAILED(rgltrGetVoltage(&session, &vddq_raw))) {
vddq_raw = 0;
}
rgltrCloseSession(&session);
}
// Pack VDD2 and VDDQ into realRAM_mV in sys-clk format
const u32 vdd2_mV = vdd2_raw / 1000; // µV to mV
const u32 vddq_mV = vddq_raw / 1000; // µV to mV
realRAM_mV = vdd2_mV * 100000 + vddq_mV * 10;
}
// Temperatures
if (R_SUCCEEDED(i2cCheck)) {
Tmp451GetSocTemp(&SOC_temperatureF);
@@ -751,70 +699,17 @@ void Misc3(void*) {
if (R_SUCCEEDED(sysclkCheck)) {
SysClkContext sysclkCTX;
if (R_SUCCEEDED(sysclkIpcGetCurrentContext(&sysclkCTX))) {
ramLoad[SysClkRamLoad_All] = sysclkCTX.ramLoad[SysClkRamLoad_All];
ramLoad[SysClkRamLoad_Cpu] = sysclkCTX.ramLoad[SysClkRamLoad_Cpu];
ramLoad[SysClkPartLoad_EMC] = sysclkCTX.PartLoad[SysClkPartLoad_EMC];
ramLoad[SysClkPartLoad_EMCCpu] = sysclkCTX.PartLoad[SysClkPartLoad_EMCCpu];
// Get voltages from sys-clk if using EOS
if (isUsingEOS && realVoltsPolling) {
realCPU_mV = sysclkCTX.realVolts[0];
realGPU_mV = sysclkCTX.realVolts[1];
realRAM_mV = sysclkCTX.realVolts[2];
realSOC_mV = sysclkCTX.realVolts[3];
}
realCPU_mV = sysclkCTX.voltages[HocClkVoltage_CPU];
realGPU_mV = sysclkCTX.voltages[HocClkVoltage_GPU];
realRAM_mV = sysclkCTX.voltages[HocClkVoltage_EMCVDDQ_MarikoOnly];
realSOC_mV = sysclkCTX.voltages[HocClkVoltage_SOC];
}
}
// Read voltages directly if not using EOS
if (canReadVoltages) {
RgltrSession session;
u32 vdd2_raw = 0, vddq_raw = 0;
// CPU voltage
if (R_SUCCEEDED(rgltrOpenSession(&session, domains[0]))) {
if (R_FAILED(rgltrGetVoltage(&session, &realCPU_mV))) {
realCPU_mV = 0;
}
rgltrCloseSession(&session);
}
// GPU voltage
if (R_SUCCEEDED(rgltrOpenSession(&session, domains[1]))) {
if (R_FAILED(rgltrGetVoltage(&session, &realGPU_mV))) {
realGPU_mV = 0;
}
rgltrCloseSession(&session);
}
// VDD2 (DRAM)
if (R_SUCCEEDED(rgltrOpenSession(&session, domains[2]))) {
if (R_FAILED(rgltrGetVoltage(&session, &vdd2_raw))) {
vdd2_raw = 0;
}
rgltrCloseSession(&session);
}
// SOC voltage
if (R_SUCCEEDED(rgltrOpenSession(&session, domains[3]))) {
if (R_FAILED(rgltrGetVoltage(&session, &realSOC_mV))) {
realSOC_mV = 0;
}
rgltrCloseSession(&session);
}
// VDDQ
if (R_SUCCEEDED(rgltrOpenSession(&session, domains[4]))) {
if (R_FAILED(rgltrGetVoltage(&session, &vddq_raw))) {
vddq_raw = 0;
}
rgltrCloseSession(&session);
}
// Pack VDD2 and VDDQ into realRAM_mV in sys-clk format
const u32 vdd2_mV = vdd2_raw / 1000; // µV to mV
const u32 vddq_mV = vddq_raw / 1000; // µV to mV
realRAM_mV = vdd2_mV * 100000 + vddq_mV * 10;
}
// Temperatures
if (R_SUCCEEDED(i2cCheck)) {
Tmp451GetSocTemp(&SOC_temperatureF);

View File

@@ -4,6 +4,8 @@
#include <cstdlib>
#include <ctime>
#include "../../sys-clk/common/include/sysclk.h"
//static tsl::elm::HeaderOverlayFrame* rootFrame = nullptr;
static bool skipMain = false;
static std::string lastSelectedItem;
@@ -128,7 +130,7 @@ public:
// list->addItem(Res);
//}
//tsl::elm::g_disableMenuCacheOnReturn.store(true, std::memory_order_release);
tsl::elm::HeaderOverlayFrame* rootFrame = new tsl::elm::HeaderOverlayFrame("Status Monitor", "Modes");
tsl::elm::HeaderOverlayFrame* rootFrame = new tsl::elm::HeaderOverlayFrame("Horizon OC Monitor", "Modes");
if (!lastSelectedItem.empty()) {
list->jumpToItem(lastSelectedItem);
}

View File

@@ -496,8 +496,8 @@ public:
snprintf(CPU_Load_c, sizeof(CPU_Load_c), "%.1f%%", cpu_usageM);
snprintf(GPU_Load_c, sizeof(GPU_Load_c), "%d.%d%%", GPU_Load_u / 10, GPU_Load_u % 10);
snprintf(RAM_Load_c, sizeof(RAM_Load_c), "%hu.%hhu%%",
PartLoad[SysClkPartLoad_EMC] / 10,
PartLoad[SysClkPartLoad_EMC] % 10);
ramLoad[SysClkPartLoad_EMC] / 10,
ramLoad[SysClkPartLoad_EMC] % 10);
mutexUnlock(&mutex_Misc);

View File

@@ -446,11 +446,11 @@ public:
);
if (R_SUCCEEDED(sysclkCheck)) {
const int RAM_GPU_Load = PartLoad[SysClkPartLoad_EMC] - PartLoad[SysClkPartLoad_EMCCpu];
const int RAM_GPU_Load = ramLoad[SysClkPartLoad_EMC] - ramLoad[SysClkPartLoad_EMCCpu];
snprintf(RAM_load_c, sizeof RAM_load_c,
"%u.%u%% CPU %u.%u%% GPU %u.%u%%",
ramLoad[SysClkRamLoad_All] / 10, ramLoad[SysClkRamLoad_All] % 10,
ramLoad[SysClkRamLoad_Cpu] / 10, ramLoad[SysClkRamLoad_Cpu] % 10,
ramLoad[SysClkPartLoad_EMC] / 10, ramLoad[SysClkPartLoad_EMC] % 10,
ramLoad[SysClkPartLoad_EMCCpu] / 10, ramLoad[SysClkPartLoad_EMCCpu] % 10,
RAM_GPU_Load / 10, RAM_GPU_Load % 10);
}
///Thermal

View File

@@ -821,7 +821,7 @@ public:
if (R_SUCCEEDED(sysclkCheck)) {
// Use sys-clk's RAM load if available
snprintf(MICRO_RAM_all_c, sizeof(MICRO_RAM_all_c), "%hu%%",
PartLoad[SysClkPartLoad_EMC] / 10);
ramLoad[SysClkPartLoad_EMC] / 10);
} else {
// Calculate percentage manually when sys-clk isn't available
const uint64_t RAM_Total_all = RAM_Total_application_u + RAM_Total_applet_u + RAM_Total_system_u + RAM_Total_systemunsafe_u;

View File

@@ -994,11 +994,11 @@ public:
unsigned ramLoadInt;
if (R_SUCCEEDED(sysclkCheck)) {
ramLoadInt = PartLoad[SysClkPartLoad_EMC] / 10;
ramLoadInt = ramLoad[SysClkPartLoad_EMC] / 10;
if (settings.showRAMLoadCPUGPU) {
unsigned ramCpuLoadInt = ramLoad[SysClkRamLoad_Cpu] / 10;
int RAM_GPU_Load = ramLoad[SysClkRamLoad_All] - ramLoad[SysClkRamLoad_Cpu];
unsigned ramCpuLoadInt = ramLoad[SysClkPartLoad_EMCCpu] / 10;
int RAM_GPU_Load = ramLoad[SysClkPartLoad_EMC] - ramLoad[SysClkPartLoad_EMCCpu];
unsigned ramGpuLoadInt = RAM_GPU_Load / 10;
if (settings.realFrequencies && realRAM_Hz) {

View File

@@ -26,10 +26,10 @@
#define NX_SERVICE_ASSUME_NON_DOMAIN
#include <sysclk/client/ipc.h>
#include <switch.h>
#include <string.h>
#include <stdatomic.h>
#include <sysclk/client/ipc.h>
static Service g_sysclkSrv;
static atomic_size_t g_refCnt;

View File

@@ -37,7 +37,7 @@ include ${TOPDIR}/lib/libultrahand/ultrahand.mk
# version control constants
#---------------------------------------------------------------------------------
#TARGET_VERSION := $(shell git describe --dirty --always --tags)
APP_VERSION := 1.0.1
APP_VERSION := 1.0.0
TARGET_VERSION := $(APP_VERSION)
#---------------------------------------------------------------------------------

View File

@@ -704,6 +704,8 @@ std::uint32_t Board::GetVoltage(HocClkVoltage voltage)
ASSERT_RESULT_OK(rc, "rgltrOpenSession")
rgltrGetVoltage(&session, &out);
rgltrCloseSession(&session);
} else {
out = Board::GetVoltage(HocClkVoltage_EMCVDD2);
}
break;
case HocClkVoltage_Display:

View File

@@ -19,9 +19,9 @@ cp -r dist/ ../../
cd ../../
cd Source/hoc-monitor/
cd Source/Horizon-OC-Monitor/
make -j"$(nproc)"
cp hoc-monitor.ovl ../../dist/switch/.overlays/hoc-monitor.ovl
cp Horizon-OC-Monitor.ovl ../../dist/switch/.overlays/Horizon-OC-Monitor.ovl
# cd ../../Source/configurator