sysclk: fix typo and add way to change kip editing path
This commit is contained in:
@@ -61,6 +61,7 @@ typedef enum {
|
|||||||
HocClkConfigValue_EnforceBoardLimit,
|
HocClkConfigValue_EnforceBoardLimit,
|
||||||
|
|
||||||
HocClkConfigValue_KipEditing,
|
HocClkConfigValue_KipEditing,
|
||||||
|
HocClkConfigValue_KipFileName,
|
||||||
|
|
||||||
KipConfigValue_custRev,
|
KipConfigValue_custRev,
|
||||||
KipConfigValue_mtcConf,
|
KipConfigValue_mtcConf,
|
||||||
@@ -227,6 +228,9 @@ static inline const char* sysclkFormatConfigValue(SysClkConfigValue val, bool pr
|
|||||||
case HocClkConfigValue_KipEditing:
|
case HocClkConfigValue_KipEditing:
|
||||||
return pretty ? "Enable KIP Editing" : "kip_editing";
|
return pretty ? "Enable KIP Editing" : "kip_editing";
|
||||||
|
|
||||||
|
case HocClkConfigValue_KipFileName:
|
||||||
|
return pretty ? "KIP File Name" : "kip_file_name";
|
||||||
|
|
||||||
// KIP config values
|
// KIP config values
|
||||||
case KipConfigValue_custRev:
|
case KipConfigValue_custRev:
|
||||||
return pretty ? "Custom Revision" : "kip_cust_rev";
|
return pretty ? "Custom Revision" : "kip_cust_rev";
|
||||||
@@ -448,6 +452,7 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
|
|||||||
case HocClkConfigValue_HandheldTDP:
|
case HocClkConfigValue_HandheldTDP:
|
||||||
case HocClkConfigValue_EnforceBoardLimit:
|
case HocClkConfigValue_EnforceBoardLimit:
|
||||||
case HocClkConfigValue_KipEditing:
|
case HocClkConfigValue_KipEditing:
|
||||||
|
case HocClkConfigValue_KipFileName:
|
||||||
return (input & 0x1) == input;
|
return (input & 0x1) == input;
|
||||||
|
|
||||||
case KipConfigValue_custRev:
|
case KipConfigValue_custRev:
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ void MiscGui::listUI()
|
|||||||
{1785000000, "Boost Mode"},
|
{1785000000, "Boost Mode"},
|
||||||
{1963000000, "Safe Max"},
|
{1963000000, "Safe Max"},
|
||||||
{2397000000, "Unsafe Max"},
|
{2397000000, "Unsafe Max"},
|
||||||
{2805000000, "Aboslute Max"},
|
{2805000000, "Absolute Max"},
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<uint32_t, std::string> cpu_freq_label_e = {
|
std::map<uint32_t, std::string> cpu_freq_label_e = {
|
||||||
@@ -284,7 +284,7 @@ void MiscGui::listUI()
|
|||||||
{1224000000, "Dev OC"},
|
{1224000000, "Dev OC"},
|
||||||
{1785000000, "Boost Mode & Safe Max"},
|
{1785000000, "Boost Mode & Safe Max"},
|
||||||
{2091000000, "Unsafe Max"},
|
{2091000000, "Unsafe Max"},
|
||||||
{2295000000, "Aboslute Max"},
|
{2295000000, "Absolute Max"},
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<uint32_t, std::string> gpu_freq_label_e = {
|
std::map<uint32_t, std::string> gpu_freq_label_e = {
|
||||||
@@ -295,7 +295,7 @@ void MiscGui::listUI()
|
|||||||
{768000000, "Docked"},
|
{768000000, "Docked"},
|
||||||
{844000000, "Safe Max"},
|
{844000000, "Safe Max"},
|
||||||
{998400000, "Unsafe Max"},
|
{998400000, "Unsafe Max"},
|
||||||
{1075200000, "Aboslute Max"},
|
{1075200000, "Absolute Max"},
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<uint32_t, std::string> gpu_freq_label_m = {
|
std::map<uint32_t, std::string> gpu_freq_label_m = {
|
||||||
@@ -305,9 +305,9 @@ void MiscGui::listUI()
|
|||||||
{460800000, "Handheld"},
|
{460800000, "Handheld"},
|
||||||
{614400000, "Handheld Safe Max"},
|
{614400000, "Handheld Safe Max"},
|
||||||
{768000000, "Docked"},
|
{768000000, "Docked"},
|
||||||
{1152200000, "Safe Max"},
|
{1075200000, "Safe Max"},
|
||||||
{1305600000, "Unsafe Max"},
|
{1305600000, "Unsafe Max"},
|
||||||
{1536000000, "Aboslute Max"},
|
{1536000000, "Absolute Max"},
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<uint32_t, std::string> emc_freq_label_e = {
|
std::map<uint32_t, std::string> emc_freq_label_e = {
|
||||||
@@ -340,6 +340,21 @@ void MiscGui::listUI()
|
|||||||
|
|
||||||
addConfigToggle(HocClkConfigValue_KipEditing, nullptr);
|
addConfigToggle(HocClkConfigValue_KipEditing, nullptr);
|
||||||
|
|
||||||
|
std::vector<NamedValue> kipNameLabels = {
|
||||||
|
NamedValue("hoc.kip", 0),
|
||||||
|
NamedValue("loader.kip", 1)
|
||||||
|
};
|
||||||
|
|
||||||
|
addConfigButton(
|
||||||
|
HocClkConfigValue_KipFileName,
|
||||||
|
"KIP File Name",
|
||||||
|
ValueRange(0, 6, 1, "", 0),
|
||||||
|
"KIP File Name",
|
||||||
|
&thresholdsDisabled,
|
||||||
|
{},
|
||||||
|
kipNameLabels,
|
||||||
|
false
|
||||||
|
);
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("KIP Settings"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("KIP Settings"));
|
||||||
|
|
||||||
std::vector<NamedValue> autoAdjOptions = {
|
std::vector<NamedValue> autoAdjOptions = {
|
||||||
@@ -609,6 +624,8 @@ void MiscGui::listUI()
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::vector<NamedValue> marikoTableConf = {
|
std::vector<NamedValue> marikoTableConf = {
|
||||||
NamedValue("Auto", 0),
|
NamedValue("Auto", 0),
|
||||||
NamedValue("Default", 1),
|
NamedValue("Default", 1),
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ ClockManager::ClockManager()
|
|||||||
this->lastCsvWriteNs = 0;
|
this->lastCsvWriteNs = 0;
|
||||||
|
|
||||||
this->rnxSync = new ReverseNXSync;
|
this->rnxSync = new ReverseNXSync;
|
||||||
|
|
||||||
if(this->config->GetConfigValue(HocClkConfigValue_KipEditing))
|
if(this->config->GetConfigValue(HocClkConfigValue_KipEditing))
|
||||||
this->GetKipData();
|
this->GetKipData();
|
||||||
}
|
}
|
||||||
@@ -523,7 +523,12 @@ void ClockManager::SetRNXRTMode(ReverseNXMode mode)
|
|||||||
void ClockManager::SetKipData() {
|
void ClockManager::SetKipData() {
|
||||||
std::scoped_lock lock{this->contextMutex};
|
std::scoped_lock lock{this->contextMutex};
|
||||||
|
|
||||||
const char* kip = "sdmc:/atmosphere/kips/hoc.kip";
|
const char* kip;
|
||||||
|
if(this->config->GetConfigValue(HocClkConfigValue_KipFileName))
|
||||||
|
kip = "sdmc:/atmosphere/kips/hoc.kip";
|
||||||
|
else
|
||||||
|
kip = "sdmc:/atmosphere/kips/loader.kip";
|
||||||
|
|
||||||
CustomizeTable table;
|
CustomizeTable table;
|
||||||
|
|
||||||
if (!cust_read_and_cache(kip, &table)) {
|
if (!cust_read_and_cache(kip, &table)) {
|
||||||
@@ -593,8 +598,12 @@ void ClockManager::SetKipData() {
|
|||||||
|
|
||||||
void ClockManager::GetKipData() {
|
void ClockManager::GetKipData() {
|
||||||
std::scoped_lock lock{this->contextMutex};
|
std::scoped_lock lock{this->contextMutex};
|
||||||
|
const char* kip;
|
||||||
|
if(this->config->GetConfigValue(HocClkConfigValue_KipFileName))
|
||||||
|
kip = "sdmc:/atmosphere/kips/hoc.kip";
|
||||||
|
else
|
||||||
|
kip = "sdmc:/atmosphere/kips/loader.kip";
|
||||||
|
|
||||||
const char* kip = "sdmc:/atmosphere/kips/hoc.kip";
|
|
||||||
CustomizeTable table;
|
CustomizeTable table;
|
||||||
|
|
||||||
if (!cust_read_and_cache(kip, &table)) {
|
if (!cust_read_and_cache(kip, &table)) {
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ extern "C"
|
|||||||
setsysExit();
|
setsysExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = fanInitialize();
|
// rc = fanInitialize();
|
||||||
if (R_FAILED(rc))
|
// if (R_FAILED(rc))
|
||||||
diagAbortWithResult(MAKERESULT(Module_Libnx, LibnxError_ShouldNotHappen));
|
// diagAbortWithResult(MAKERESULT(Module_Libnx, LibnxError_ShouldNotHappen));
|
||||||
|
|
||||||
rc = i2cInitialize();
|
rc = i2cInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
@@ -95,7 +95,7 @@ extern "C"
|
|||||||
void __appExit(void)
|
void __appExit(void)
|
||||||
{
|
{
|
||||||
CloseFanControllerThread();
|
CloseFanControllerThread();
|
||||||
fanExit();
|
// fanExit();
|
||||||
i2cExit();
|
i2cExit();
|
||||||
fsExit();
|
fsExit();
|
||||||
fsdevUnmountAll();
|
fsdevUnmountAll();
|
||||||
@@ -126,10 +126,10 @@ int main(int argc, char** argv)
|
|||||||
clockMgr->SetRunning(true);
|
clockMgr->SetRunning(true);
|
||||||
clockMgr->GetConfig()->SetEnabled(true);
|
clockMgr->GetConfig()->SetEnabled(true);
|
||||||
ipcSrv->SetRunning(true);
|
ipcSrv->SetRunning(true);
|
||||||
TemperaturePoint *table;
|
// TemperaturePoint *table;
|
||||||
ReadConfigFile(&table);
|
// ReadConfigFile(&table);
|
||||||
InitFanController(table);
|
// InitFanController(table);
|
||||||
StartFanControllerThread();
|
// StartFanControllerThread();
|
||||||
|
|
||||||
while (clockMgr->Running())
|
while (clockMgr->Running())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user