add decimal config
This commit is contained in:
@@ -1291,6 +1291,7 @@ struct MiniSettings {
|
||||
bool realFrequencies;
|
||||
bool realVolts;
|
||||
bool realTemps;
|
||||
bool realTempsDec;
|
||||
bool showFullCPU;
|
||||
bool showFullResolution;
|
||||
bool showFanPercentage;
|
||||
@@ -1327,6 +1328,7 @@ struct MicroSettings {
|
||||
bool realFrequencies;
|
||||
bool realVolts;
|
||||
bool realTemps;
|
||||
bool realTempsDec;
|
||||
bool showFullCPU;
|
||||
bool showFullResolution;
|
||||
bool showSOCVoltage;
|
||||
@@ -1411,6 +1413,7 @@ ALWAYS_INLINE void GetConfigSettings(MiniSettings* settings) {
|
||||
settings->realFrequencies = true;
|
||||
settings->realVolts = true;
|
||||
settings->realTemps = true;
|
||||
settings->realTempsDec = false;
|
||||
settings->showFullCPU = false;
|
||||
settings->showFullResolution = true;
|
||||
settings->showFanPercentage = true;
|
||||
@@ -1494,6 +1497,14 @@ ALWAYS_INLINE void GetConfigSettings(MiniSettings* settings) {
|
||||
convertToUpper(key);
|
||||
settings->realTemps = (key == "TRUE");
|
||||
}
|
||||
|
||||
it = section.find("real_temps_dec");
|
||||
if (it != section.end()) {
|
||||
key = it->second;
|
||||
convertToUpper(key);
|
||||
settings->realTempsDec = !(key == "FALSE");
|
||||
}
|
||||
|
||||
// Process font sizes with shared bounds
|
||||
static constexpr long minFontSize = 8;
|
||||
static constexpr long maxFontSize = 22;
|
||||
@@ -1710,6 +1721,7 @@ ALWAYS_INLINE void GetConfigSettings(MicroSettings* settings) {
|
||||
settings->realFrequencies = true;
|
||||
settings->realVolts = true;
|
||||
settings->realTemps = true;
|
||||
settings->realTempsDec = false;
|
||||
settings->showFullCPU = false;
|
||||
settings->showFullResolution = false;
|
||||
settings->showSOCVoltage = true;
|
||||
@@ -1785,7 +1797,14 @@ ALWAYS_INLINE void GetConfigSettings(MicroSettings* settings) {
|
||||
key = it->second;
|
||||
convertToUpper(key);
|
||||
settings->realTemps = (key == "TRUE");
|
||||
}
|
||||
}
|
||||
|
||||
it = section.find("real_temps_dec");
|
||||
if (it != section.end()) {
|
||||
key = it->second;
|
||||
convertToUpper(key);
|
||||
settings->realTempsDec = !(key == "FALSE");
|
||||
}
|
||||
|
||||
it = section.find("show_full_cpu");
|
||||
if (it != section.end()) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -884,7 +884,7 @@ public:
|
||||
|
||||
if (settings.realTemps && realCPU_Temp != 0) {
|
||||
char temp_buffer[48];
|
||||
snprintf(temp_buffer, sizeof(temp_buffer), "%s", CPU_temp_c);
|
||||
snprintf(temp_buffer, sizeof(temp_buffer), " %s", CPU_temp_c);
|
||||
strncat(CPU_compressed_c, temp_buffer, sizeof(CPU_compressed_c) - strlen(CPU_compressed_c) - 1);
|
||||
}
|
||||
|
||||
@@ -914,7 +914,7 @@ public:
|
||||
|
||||
if (settings.realTemps && realGPU_Temp != 0) {
|
||||
char temp_buffer[48];
|
||||
snprintf(temp_buffer, sizeof(temp_buffer), "%s", GPU_temp_c);
|
||||
snprintf(temp_buffer, sizeof(temp_buffer), " %s", GPU_temp_c);
|
||||
strncat(GPU_Load_c, temp_buffer, sizeof(GPU_Load_c) - strlen(GPU_Load_c) - 1);
|
||||
}
|
||||
|
||||
@@ -979,7 +979,7 @@ public:
|
||||
|
||||
if (settings.realTemps && realRAM_Temp != 0) {
|
||||
char temp_buffer[48];
|
||||
snprintf(temp_buffer, sizeof(temp_buffer), "%s", RAM_temp_c);
|
||||
snprintf(temp_buffer, sizeof(temp_buffer), " %s", RAM_temp_c);
|
||||
strncat(RAM_var_compressed_c, temp_buffer, sizeof(RAM_var_compressed_c) - strlen(RAM_var_compressed_c) - 1);
|
||||
}
|
||||
|
||||
@@ -1099,16 +1099,28 @@ public:
|
||||
}
|
||||
|
||||
if (settings.realTemps) {
|
||||
if (realCPU_Temp != 0) {
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%.1f°C", realCPU_Temp / 1000.0f);
|
||||
}
|
||||
if (realGPU_Temp != 0) {
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%.1f°C", realGPU_Temp / 1000.0f);
|
||||
}
|
||||
if (realRAM_Temp != 0) {
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%.1f°C", realRAM_Temp / 1000.0f);
|
||||
}
|
||||
}
|
||||
if (realCPU_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%.1f°C", realCPU_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%u°C", static_cast<u32>(realCPU_Temp / 1000.0));
|
||||
}
|
||||
}
|
||||
if (realGPU_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%.1f°C", realGPU_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%u°C", static_cast<u32>(realGPU_Temp / 1000.0));
|
||||
}
|
||||
}
|
||||
if (realRAM_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%.1f°C", realRAM_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%u°C", static_cast<u32>(realRAM_Temp / 1000.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Resolution processing
|
||||
//char RES_var_compressed_c[32] = "";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user