|
|
|
@ -233,8 +233,8 @@ hotend_info_t Temperature::temp_hotend[HOTENDS]; // = { 0 }
|
|
|
|
|
#endif
|
|
|
|
|
#if WATCH_CHAMBER
|
|
|
|
|
heater_watch_t Temperature::watch_chamber = { 0 };
|
|
|
|
|
millis_t Temperature::next_chamber_check_ms;
|
|
|
|
|
#endif
|
|
|
|
|
millis_t Temperature::next_chamber_check_ms;
|
|
|
|
|
#endif // HAS_HEATED_CHAMBER
|
|
|
|
|
#endif // HAS_TEMP_CHAMBER
|
|
|
|
|
|
|
|
|
@ -1058,12 +1058,14 @@ void Temperature::manage_heater() {
|
|
|
|
|
}
|
|
|
|
|
#endif // WATCH_BED
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
|
|
|
|
|
#if DISABLED(PIDTEMPBED)
|
|
|
|
|
if (PENDING(ms, next_bed_check_ms)
|
|
|
|
|
#if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
|
|
|
|
|
&& paused == last_pause_state
|
|
|
|
|
#endif
|
|
|
|
|
) return;
|
|
|
|
|
) break;
|
|
|
|
|
next_bed_check_ms = ms + BED_CHECK_INTERVAL;
|
|
|
|
|
#if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
|
|
|
|
|
last_pause_state = paused;
|
|
|
|
@ -1108,6 +1110,9 @@ void Temperature::manage_heater() {
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} while (false);
|
|
|
|
|
|
|
|
|
|
#endif // HAS_HEATED_BED
|
|
|
|
|
|
|
|
|
|
#if HAS_HEATED_CHAMBER
|
|
|
|
@ -1129,9 +1134,9 @@ void Temperature::manage_heater() {
|
|
|
|
|
else
|
|
|
|
|
start_watching_chamber(); // Start again if the target is still far off
|
|
|
|
|
}
|
|
|
|
|
#endif // WATCH_CHAMBER
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (PENDING(ms, next_chamber_check_ms)) return;
|
|
|
|
|
if (ELAPSED(ms, next_chamber_check_ms)) {
|
|
|
|
|
next_chamber_check_ms = ms + CHAMBER_CHECK_INTERVAL;
|
|
|
|
|
|
|
|
|
|
if (WITHIN(temp_chamber.current, CHAMBER_MINTEMP, CHAMBER_MAXTEMP)) {
|
|
|
|
@ -1152,6 +1157,7 @@ void Temperature::manage_heater() {
|
|
|
|
|
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
|
|
|
|
|
thermal_runaway_protection(tr_state_machine_chamber, temp_chamber.current, temp_chamber.target, -2, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: Implement true PID pwm
|
|
|
|
|
//temp_bed.soft_pwm_amount = WITHIN(temp_chamber.current, CHAMBER_MINTEMP, CHAMBER_MAXTEMP) ? (int)get_pid_output_chamber() >> 1 : 0;
|
|
|
|
@ -1788,8 +1794,8 @@ void Temperature::init() {
|
|
|
|
|
|
|
|
|
|
#if WATCH_CHAMBER
|
|
|
|
|
/**
|
|
|
|
|
* Start Heating Sanity Check for hotends that are below
|
|
|
|
|
* their target temperature by a configurable margin.
|
|
|
|
|
* Start Heating Sanity Check for chamber that is below
|
|
|
|
|
* its target temperature by a configurable margin.
|
|
|
|
|
* This is called when the temperature is set. (M141, M191)
|
|
|
|
|
*/
|
|
|
|
|
void Temperature::start_watching_chamber() {
|
|
|
|
|