From 7ea7f5f324c1a72e8fa6d73ff1d270cf7c6959fb Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 8 Sep 2011 10:51:32 +1000 Subject: [PATCH] Allow temperatures greater than 100 degrees. --- adl.c | 6 +++--- main.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/adl.c b/adl.c index 8fc2e6dc..13ffb5a8 100644 --- a/adl.c +++ b/adl.c @@ -969,8 +969,8 @@ void change_autosettings(int gpu) set_defaultengine(gpu); } } else if (!strncasecmp(&input, "t", 1)) { - val = curses_int("Enter target temperature for this GPU in C (0-100)"); - if (val < 0 || val > 100) + val = curses_int("Enter target temperature for this GPU in C (0-200)"); + if (val < 0 || val > 200) wlogprint("Invalid temperature"); else ga->targettemp = val; @@ -989,7 +989,7 @@ void change_autosettings(int gpu) else ga->cutofftemp = val; } else if (!strncasecmp(&input, "h", 1)) { - val = curses_int("Enter hysteresis temperature difference (0-10)"); + val = curses_int("Enter hysteresis temperature difference (1-10)"); if (val < 1 || val > 10) wlogprint("Invalid value"); else diff --git a/main.c b/main.c index 68afb7bb..24cac40d 100644 --- a/main.c +++ b/main.c @@ -972,9 +972,9 @@ static char *set_int_0_to_10(const char *arg, int *i) return set_int_range(arg, i, 0, 10); } -static char *set_int_0_to_100(const char *arg, int *i) +static char *set_int_0_to_200(const char *arg, int *i) { - return set_int_range(arg, i, 0, 100); + return set_int_range(arg, i, 0, 200); } static char *set_int_1_to_10(const char *arg, int *i) @@ -1418,16 +1418,16 @@ static struct opt_table opt_config_table[] = { #endif #ifdef HAVE_ADL OPT_WITH_ARG("--temp-cutoff", - set_int_0_to_9999, opt_show_intval, &opt_cutofftemp, + set_int_0_to_200, opt_show_intval, &opt_cutofftemp, "Set the temperature where a GPU device will be automatically disabled"), OPT_WITH_ARG("--temp-hysteresis", set_int_1_to_10, opt_show_intval, &opt_hysteresis, "Set how much the temperature can fluctuate outside limits when automanaging speeds"), OPT_WITH_ARG("--temp-overheat", - set_int_0_to_100, opt_show_intval, &opt_overheattemp, + set_int_0_to_200, opt_show_intval, &opt_overheattemp, "Set the overheat temperature when automatically managing fan and GPU speeds"), OPT_WITH_ARG("--temp-target", - set_int_0_to_100, opt_show_intval, &opt_targettemp, + set_int_0_to_200, opt_show_intval, &opt_targettemp, "Set the target temperature when automatically managing fan and GPU speeds"), #endif OPT_WITHOUT_ARG("--text-only|-T",