Hotend Idle Timeout (#16362)

This commit is contained in:
Italo Soares
2020-05-18 02:50:35 -03:00
committed by GitHub
parent 6e01079b48
commit 213d4b890e
8 changed files with 157 additions and 2 deletions

View File

@ -612,6 +612,10 @@ class Temperature {
return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
}
FORCE_INLINE static bool degHotendNear(const uint8_t e, const float &temp) {
return ABS(degHotend(e) - temp) < (TEMP_HYSTERESIS);
}
#endif // HOTENDS
#if HAS_HEATED_BED
@ -650,6 +654,10 @@ class Temperature {
static void wait_for_bed_heating();
FORCE_INLINE static bool degBedNear(const float &temp) {
return ABS(degBed() - temp) < (TEMP_BED_HYSTERESIS);
}
#endif // HAS_HEATED_BED
#if HAS_TEMP_PROBE