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;
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue