Introduce temp watch protection for the bed

When setting the bed temp via M140/M190 if the thermistor does not read an increase of WATCH_BED_TEMP_INCREASE degrees by WATCH_BED_TEMP_PERIOD seconds then it will throw "Error:Heating failed, system stopped! Heater_ID: bed" and call the kill() function.

Conflicts:
	Marlin/Configuration_adv.h
This commit is contained in:
gralco
2016-04-15 10:27:18 -06:00
committed by Scott Lahteine
parent 98f30283fa
commit 908229dbb3
19 changed files with 259 additions and 9 deletions

View File

@ -124,17 +124,26 @@ FORCE_INLINE float rawBedTemp() { return current_temperature_bed_raw; }
FORCE_INLINE float degTargetHotend(uint8_t extruder) { return target_temperature[extruder]; }
FORCE_INLINE float degTargetBed() { return target_temperature_bed; }
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
void start_watching_heater(int e = 0);
#endif
#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
void start_watching_bed();
#endif
FORCE_INLINE void setTargetHotend(const float& celsius, uint8_t extruder) {
target_temperature[extruder] = celsius;
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
start_watching_heater(extruder);
#endif
}
FORCE_INLINE void setTargetBed(const float& celsius) { target_temperature_bed = celsius; }
FORCE_INLINE void setTargetBed(const float& celsius) {
target_temperature_bed = celsius;
#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
start_watching_bed();
#endif
}
FORCE_INLINE bool isHeatingHotend(uint8_t extruder) { return target_temperature[extruder] > current_temperature[extruder]; }
FORCE_INLINE bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; }