From 9586b59606edcf3538428c16680a2a6eb2d7969d Mon Sep 17 00:00:00 2001
From: PA4WDH
Date: Wed, 9 Oct 2024 12:18:23 +0200
Subject: Rename config.max_freq to config.target_freq and make texts
consistent with that
---
README.html | 2 +-
argparse.c | 6 +++---
cputemp2maxfreq.c | 10 +++++-----
cputemp2maxfreq.h | 2 +-
logger.c | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/README.html b/README.html
index 77c8d09..3dbf882 100644
--- a/README.html
+++ b/README.html
@@ -57,7 +57,7 @@
-s set the step size to increase/decrease CPU speed.
Note that this value will be multiplied by the difference between the CPU
temperature and the set temperature to calculate the actual change.
- -t set the temperature limit
+ -t set the target temperature
Logging options:
diff --git a/argparse.c b/argparse.c
index 9f702f0..e9d16c4 100644
--- a/argparse.c
+++ b/argparse.c
@@ -55,7 +55,7 @@ void printhelp()
" Default: all\n"
"-s Step size in Khz when increasing/decreasing CPU speed\n"
" Default: %ld\n"
- "-t Temperature limit\n"
+ "-t Target temperature\n"
" Default: %ld\n"
"\n"
"Logging options:\n"
@@ -72,7 +72,7 @@ void printhelp()
"-h Display this help text\n"
"-v Display version and license information\n",
config.name,config.fallback_freq,config.governor,config.temp_input,config.interval,
- config.freq_step,config.max_temp/1000,config.logger_name
+ config.freq_step,config.target_temp/1000,config.logger_name
);
}
@@ -177,7 +177,7 @@ void argparse(int argc, char **argv)
userconfig.freq_step=strtoll(optarg,NULL,10);
break;
case 't':
- userconfig.max_temp=strtoll(optarg,NULL,10)*1000;
+ userconfig.target_temp=strtoll(optarg,NULL,10)*1000;
break;
case 'u':
userconfig.use_unixtime=1;
diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c
index 81fcdef..f4a9c51 100644
--- a/cputemp2maxfreq.c
+++ b/cputemp2maxfreq.c
@@ -37,7 +37,7 @@
struct s_config config={
.name="", // Name of this program, set by argparse
.governor="conservative", // Governor
- .max_temp=70000, // Temperature
+ .target_temp=70000, // Target temperature
.temp_input="auto", // Temperature input
.freq_step=100000, // Frequency step
.fallback_freq=2000000, // Fallback frequency
@@ -100,7 +100,7 @@ int main(int argc,char **argv)
// Log configuration
config.logger("Configuration:");
config.logger("Governor: %s",config.governor);
- config.logger("Temperature: %ld",config.max_temp);
+ config.logger("Target temperature: %ld",config.target_temp);
config.logger("Temp input: %s",config.temp_input);
config.logger("Frequency step: %ld",config.freq_step);
config.logger("Fallback frquency: %ld",config.fallback_freq);
@@ -134,7 +134,7 @@ int main(int argc,char **argv)
config.logger("Physical CPU to change: %d",config.cpu);
}
- if ((config.max_tempVALID_TEMP_MAX))
+ if ((config.target_tempVALID_TEMP_MAX))
{
config.logger("Invalid temperature, range is %d-%d",VALID_TEMP_MIN,VALID_TEMP_MAX);
exit(1);
@@ -297,14 +297,14 @@ int main(int argc,char **argv)
failsafe(1);
}
- DEBUG1_MAIN("Data: %ld %ld %ld %ld %ld\n",cpudata.cur_temp,config.max_temp,cpudata.max_freq,cpudata.scale_max,cpudata.cur_freq);
+ DEBUG1_MAIN("Data: %ld %ld %ld %ld %ld\n",cpudata.cur_temp,config.target_temp,cpudata.max_freq,cpudata.scale_max,cpudata.cur_freq);
if (config.log_data>0)
{
config.logger("CPU Temperature: %ld, CPU Frequency: %ld",cpudata.cur_temp/1000,cpudata.cur_freq);
}
if (config.csvfile!=NULL) csvlog_write();
- diff=config.max_temp-cpudata.cur_temp;
+ diff=config.target_temp-cpudata.cur_temp;
// Check if we should increase
if ((diff>=1000) && (cpudata.scale_max