Added temperature window to M109. This is needed for systems with no overshoot PID.
This commit is contained in:
@@ -104,12 +104,12 @@
|
||||
// M240 - Trigger a camera to take a photograph
|
||||
// M301 - Set PID parameters P I and D
|
||||
// M302 - Allow cold extrudes
|
||||
// M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
|
||||
// M400 - Finish all moves
|
||||
// M500 - stores paramters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
// M503 - print the current settings (from memory not from eeprom)
|
||||
// M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
|
||||
// M999 - Restart after being stopped by error
|
||||
|
||||
//Stepper Movement Variables
|
||||
@@ -940,8 +940,8 @@ void process_commands()
|
||||
#ifdef TEMP_RESIDENCY_TIME
|
||||
/* start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time
|
||||
or when current temp falls outside the hysteresis after target temp was reached */
|
||||
if ((residencyStart == -1 && target_direction && !isHeatingHotend(tmp_extruder)) ||
|
||||
(residencyStart == -1 && !target_direction && !isCoolingHotend(tmp_extruder)) ||
|
||||
if ((residencyStart == -1 && target_direction && (degHotend(tmp_extruder) >= (degTargetHotend(tmp_extruder)-TEMP_WINDOW))) ||
|
||||
(residencyStart == -1 && !target_direction && (degHotend(tmp_extruder) <= (degTargetHotend(tmp_extruder)+TEMP_WINDOW))) ||
|
||||
(residencyStart > -1 && labs(degHotend(tmp_extruder) - degTargetHotend(tmp_extruder)) > TEMP_HYSTERESIS) )
|
||||
{
|
||||
residencyStart = millis();
|
||||
|
Reference in New Issue
Block a user