@@ -311,7 +311,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
311
311
* public:
312
312
*/
313
313
314
- #if ENABLED(NO_FAN_SLOWING_IN_PID_TUNING )
314
+ #if ENABLED(TEMP_TUNING_MAINTAIN_FAN )
315
315
bool Temperature::adaptive_fan_slowing = true ;
316
316
#endif
317
317
@@ -688,7 +688,7 @@ volatile bool Temperature::raw_temps_ready = false;
688
688
LEDColor color = ONHEATINGSTART ();
689
689
#endif
690
690
691
- TERN_ (NO_FAN_SLOWING_IN_PID_TUNING , adaptive_fan_slowing = false );
691
+ TERN_ (TEMP_TUNING_MAINTAIN_FAN , adaptive_fan_slowing = false );
692
692
693
693
LCD_MESSAGE (MSG_HEATING);
694
694
@@ -876,7 +876,7 @@ volatile bool Temperature::raw_temps_ready = false;
876
876
TERN_ (DWIN_PID_TUNE, DWIN_PidTuning (PID_DONE));
877
877
878
878
EXIT_M303:
879
- TERN_ (NO_FAN_SLOWING_IN_PID_TUNING , adaptive_fan_slowing = true );
879
+ TERN_ (TEMP_TUNING_MAINTAIN_FAN , adaptive_fan_slowing = true );
880
880
return ;
881
881
}
882
882
@@ -910,6 +910,7 @@ volatile bool Temperature::raw_temps_ready = false;
910
910
return false ;
911
911
}
912
912
913
+ wait_for_heatup = false ;
913
914
return true ;
914
915
};
915
916
@@ -927,6 +928,8 @@ volatile bool Temperature::raw_temps_ready = false;
927
928
#endif
928
929
929
930
do_z_clearance (MPC_TUNING_END_Z);
931
+
932
+ TERN_ (TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true );
930
933
}
931
934
} on_exit;
932
935
@@ -935,6 +938,8 @@ volatile bool Temperature::raw_temps_ready = false;
935
938
MPCHeaterInfo &hotend = temp_hotend[active_extruder];
936
939
MPC_t &mpc = hotend.mpc ;
937
940
941
+ TERN_ (TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = false );
942
+
938
943
// Move to center of bed, just above bed height and cool with max fan
939
944
gcode.home_all_axes (true );
940
945
disable_all_heaters ();
@@ -970,7 +975,6 @@ volatile bool Temperature::raw_temps_ready = false;
970
975
next_test_ms += 10000UL ;
971
976
}
972
977
}
973
- wait_for_heatup = false ;
974
978
975
979
#if HAS_FAN
976
980
set_fan_speed (EITHER (MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0 );
@@ -989,6 +993,7 @@ volatile bool Temperature::raw_temps_ready = false;
989
993
uint16_t sample_distance = 1 ;
990
994
float t1_time = 0 ;
991
995
996
+ wait_for_heatup = true ;
992
997
for (;;) { // Can be interrupted with M108
993
998
if (!housekeeping (ms, current_temp, next_report_ms)) return ;
994
999
@@ -1045,6 +1050,7 @@ volatile bool Temperature::raw_temps_ready = false;
1045
1050
#endif
1046
1051
float last_temp = current_temp;
1047
1052
1053
+ wait_for_heatup = true ;
1048
1054
for (;;) { // Can be interrupted with M108
1049
1055
if (!housekeeping (ms, current_temp, next_report_ms)) return ;
1050
1056
@@ -4124,6 +4130,7 @@ void Temperature::isr() {
4124
4130
4125
4131
} while (wait_for_heatup && TEMP_CONDITIONS);
4126
4132
4133
+ // If wait_for_heatup is set, temperature was reached, no cancel
4127
4134
if (wait_for_heatup) {
4128
4135
wait_for_heatup = false ;
4129
4136
#if HAS_DWIN_E3V2_BASIC
@@ -4262,6 +4269,7 @@ void Temperature::isr() {
4262
4269
4263
4270
} while (wait_for_heatup && TEMP_BED_CONDITIONS);
4264
4271
4272
+ // If wait_for_heatup is set, temperature was reached, no cancel
4265
4273
if (wait_for_heatup) {
4266
4274
wait_for_heatup = false ;
4267
4275
ui.reset_status ();
@@ -4340,6 +4348,7 @@ void Temperature::isr() {
4340
4348
}
4341
4349
}
4342
4350
4351
+ // If wait_for_heatup is set, temperature was reached, no cancel
4343
4352
if (wait_for_heatup) {
4344
4353
wait_for_heatup = false ;
4345
4354
ui.reset_status ();
@@ -4439,6 +4448,7 @@ void Temperature::isr() {
4439
4448
}
4440
4449
} while (wait_for_heatup && TEMP_CHAMBER_CONDITIONS);
4441
4450
4451
+ // If wait_for_heatup is set, temperature was reached, no cancel
4442
4452
if (wait_for_heatup) {
4443
4453
wait_for_heatup = false ;
4444
4454
ui.reset_status ();
@@ -4525,6 +4535,7 @@ void Temperature::isr() {
4525
4535
first_loop = false ;
4526
4536
#endif // TEMP_COOLER_RESIDENCY_TIME > 0
4527
4537
4538
+ // Prevent a wait-forever situation if R is misused i.e. M191 R0
4528
4539
if (wants_to_cool) {
4529
4540
// Break after MIN_COOLING_SLOPE_TIME_CHAMBER seconds
4530
4541
// if the temperature did not drop at least MIN_COOLING_SLOPE_DEG_CHAMBER
@@ -4537,7 +4548,7 @@ void Temperature::isr() {
4537
4548
4538
4549
} while (wait_for_heatup && TEMP_COOLER_CONDITIONS);
4539
4550
4540
- // Prevent a wait-forever situation if R is misused i.e. M191 R0
4551
+ // If wait_for_heatup is set, temperature was reached, no cancel
4541
4552
if (wait_for_heatup) {
4542
4553
wait_for_heatup = false ;
4543
4554
ui.reset_status ();
0 commit comments