klondike - change options to clock and temptarget only
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
diff --git a/ASIC-README b/ASIC-README
index a56666c..f495d29 100644
--- a/ASIC-README
+++ b/ASIC-README
@@ -105,7 +105,7 @@ ASIC SPECIFIC COMMANDS
--bitburner-fury-options <arg> Override avalon-options for BitBurner Fury boards baud:miners:asic:timeout:freq
--bitburner-fury-voltage <arg> Set BitBurner Fury core voltage, in millivolts
--bitburner-voltage <arg> Set BitBurner (Avalon) core voltage, in millivolts
---klondike-options <arg> Set klondike options clock:temp1:temp2:fan
+--klondike-options <arg> Set klondike options clock:temptarget
AVALON AND BITBURNER DEVICES
diff --git a/README b/README
index 0a96dee..7f32794 100644
--- a/README
+++ b/README
@@ -227,6 +227,7 @@ ASIC only options:
--bitburner-fury-options <arg> Override avalon-options for BitBurner Fury boards baud:miners:asic:timeout:freq
--bitburner-fury-voltage <arg> Set BitBurner Fury core voltage, in millivolts
--bitburner-voltage <arg> Set BitBurner (Avalon) core voltage, in millivolts
+--klondike-options <arg> Set klondike options clock:temptarget
See ASIC-README for more information regarding these.
diff --git a/cgminer.c b/cgminer.c
index f4cb7d6..6cba29f 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1270,7 +1270,7 @@ static struct opt_table opt_config_table[] = {
#ifdef USE_KLONDIKE
OPT_WITH_ARG("--klondike-options",
set_klondike_options, NULL, NULL,
- "Set klondike options clock:temp1:temp2:fan"),
+ "Set klondike options clock:temptarget"),
#endif
OPT_WITHOUT_ARG("--load-balance",
set_loadbalance, &pool_strategy,
diff --git a/driver-klondike.c b/driver-klondike.c
index f38314c..54743d6 100644
--- a/driver-klondike.c
+++ b/driver-klondike.c
@@ -710,32 +710,14 @@ static bool klondike_init(struct cgpu_info *klncgpu)
// boundaries are checked by device, with valid values returned
if (opt_klondike_options != NULL) {
- int hashclock, fantarget;
- double temp1, temp2;
+ int hashclock;
+ double temptarget;
- sscanf(opt_klondike_options, "%d:%lf:%lf:%d",
- &hashclock,
- &temp1, &temp2,
- &fantarget);
+ sscanf(opt_klondike_options, "%d:%lf", &hashclock, &temptarget);
SET_HASHCLOCK(kline.cfg.hashclock, hashclock);
- kline.cfg.temptarget = cvtCToKln(temp1);
- kline.cfg.tempcritical = cvtCToKln(temp2);
- if (fantarget < 0) {
- applog(LOG_WARNING,
- "%s%i: %s options invalid fantarget < 0 using 0",
- klncgpu->drv->name,
- klncgpu->device_id,
- klncgpu->drv->dname);
- fantarget = 0;
- } else if (fantarget > 100) {
- applog(LOG_WARNING,
- "%s%i: %s options invalid fantarget > 100 using 100",
- klncgpu->drv->name,
- klncgpu->device_id,
- klncgpu->drv->dname);
- fantarget = 100;
- }
- kline.cfg.fantarget = (int)(255 * fantarget / 100);
+ kline.cfg.temptarget = cvtCToKln(temptarget);
+ kline.cfg.tempcritical = 0; // hard code for old firmware
+ kline.cfg.fantarget = 0xff; // hard code for old firmware
size = sizeof(kline.cfg) - 2;
}