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:
parent
7a57b69cc1
commit
03cebb5a82
5
temp.c
5
temp.c
|
|
@ -271,8 +271,8 @@ void temp_sensor_tick() {
|
|||
break;
|
||||
}
|
||||
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))
|
||||
temp_sensors_runtime[i].temp_residency++;
|
||||
}
|
||||
|
|
@ -284,7 +284,6 @@ void temp_sensor_tick() {
|
|||
heater_tick(temp_sensors[i].heater, i, temp_sensors_runtime[i].last_read_temp, temp_sensors_runtime[i].target_temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// report whether all temp sensors are reading their target temperatures
|
||||
|
|
|
|||
Loading…
Reference in New Issue