TEMP_RESIDENCY now in units of 10ms rather than next_read_time

Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
This commit is contained in:
Sergey Batalov 2011-05-10 14:10:56 +10:00 committed by Michael Moon
parent 7a57b69cc1
commit 03cebb5a82
1 changed files with 10 additions and 11 deletions

5
temp.c
View File

@ -271,8 +271,8 @@ void temp_sensor_tick() {
break; break;
} }
temp_sensors_runtime[i].last_read_temp = temp; temp_sensors_runtime[i].last_read_temp = temp;
}
if (labs((int16_t)(temp - temp_sensors_runtime[i].target_temp)) < (TEMP_HYSTERESIS*4)) { if (labs((int16_t)(temp_sensors_runtime[i].last_read_temp - temp_sensors_runtime[i].target_temp)) < (TEMP_HYSTERESIS*4)) {
if (temp_sensors_runtime[i].temp_residency < (TEMP_RESIDENCY_TIME*100)) if (temp_sensors_runtime[i].temp_residency < (TEMP_RESIDENCY_TIME*100))
temp_sensors_runtime[i].temp_residency++; temp_sensors_runtime[i].temp_residency++;
} }
@ -285,7 +285,6 @@ void temp_sensor_tick() {
} }
} }
} }
}
/// report whether all temp sensors are reading their target temperatures /// report whether all temp sensors are reading their target temperatures
/// used for M109 and friends /// used for M109 and friends