Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#4033 from gudnimg/improve-preheat-t…
Browse files Browse the repository at this point in the history
…arget

preheat: improve target temperature threshold
  • Loading branch information
3d-gussner authored Mar 3, 2023
2 parents bc81863 + 496b52b commit 474d489
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11424,7 +11424,7 @@ void M600_wait_for_user(float HotendTempBckp) {
}
break;
case 2: //waiting for nozzle to reach target temperature
if (fabs(degTargetHotend(active_extruder) - degHotend(active_extruder)) < 1) {
if (fabs(degTargetHotend(active_extruder) - degHotend(active_extruder)) < TEMP_HYSTERESIS) {
lcd_display_message_fullscreen_P(_T(MSG_PRESS_TO_UNLOAD));
waiting_start_time = _millis();
wait_for_user_state = 0;
Expand Down
4 changes: 2 additions & 2 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)

lcd_timeoutToStatus.stop();

if (current_temperature[0] > (target_temperature[0] * 0.95))
if (abs((int)current_temperature[0] - nTemp) > TEMP_HYSTERESIS)
{
switch (eFilamentAction)
{
Expand Down Expand Up @@ -3772,7 +3772,7 @@ static void wait_preheat()
plan_buffer_line_curposXYZE(homing_feedrate[Z_AXIS] / 60);
delay_keep_alive(2000);
lcd_display_message_fullscreen_P(_T(MSG_WIZARD_HEATING));
while (fabs(degHotend(0) - degTargetHotend(0)) > 3) {
while (fabs(degHotend(0) - degTargetHotend(0)) > TEMP_HYSTERESIS) {
lcd_display_message_fullscreen_P(_T(MSG_WIZARD_HEATING));

lcd_set_cursor(0, 4);
Expand Down

0 comments on commit 474d489

Please sign in to comment.