mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-30 15:26:18 +00:00
Merge pull request #2137 from thinkyhead/tweak_swh
Move millis call in start_watching_heater
This commit is contained in:
commit
94dff5b36a
@ -1004,10 +1004,9 @@ void tp_init() {
|
|||||||
* This is called when the temperature is set. (M104, M109)
|
* This is called when the temperature is set. (M104, M109)
|
||||||
*/
|
*/
|
||||||
void start_watching_heater(int e) {
|
void start_watching_heater(int e) {
|
||||||
millis_t ms = millis() + WATCH_TEMP_PERIOD * 1000;
|
|
||||||
if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
|
if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
|
||||||
watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE;
|
watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE;
|
||||||
watch_heater_next_ms[e] = ms;
|
watch_heater_next_ms[e] = millis() + WATCH_TEMP_PERIOD * 1000;;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
watch_heater_next_ms[e] = 0;
|
watch_heater_next_ms[e] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user