1 --- /home/peto/x/thinkfan-0.7.1/thinkfan.c 2010-06-14 01:31:18.000000000 +0200
2 +++ ./thinkfan.c 2010-10-11 17:12:20.000000000 +0200
4 prefix = "\n"; // It is set to "" by the output macros
6 // Set initial fan level...
7 - lvl_idx = config->num_limits - 1;
9 b_temp = temp = config->get_temp();
10 - if (errcnt) return errcnt;
11 - while ((temp <= config->limits[lvl_idx].low) \
12 - && (lvl_idx > 0)) lvl_idx--;
15 + while ((temp > config->limits[lvl_idx].high) \
16 + && (lvl_idx > config->num_limits- 1))
23 /**********************************************
24 * Main loop. This is the actual fan control.
25 **********************************************/
28 // depending on the command line, this might also call depulse()
29 temp = config->get_temp();
30 + //if (temp != 0 && last_temp == 0)
31 + // last_temp = temp;
33 + // check whether the value is correct
34 + if (temp == 0 || last_temp == 0) {
38 // Write current fan level to IBM_FAN one cycle before the watchdog
39 // timeout ends, to let it know we're alive.