@@ -342,7 +342,7 @@ void DGUSScreenHandler::GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr) {
342
342
void DGUSScreenHandler::GetMinExtrudeTemp (DGUS_VP_Variable &var, void *val_ptr) {
343
343
DEBUG_ECHOLNPGM (" GetMinExtrudeTemp" );
344
344
const uint16_t value = swap16 (*(uint16_t *)val_ptr);
345
- thermalManager.extrude_min_temp = value;
345
+ TERN_ (PREVENT_COLD_EXTRUSION, thermalManager.extrude_min_temp = value) ;
346
346
mks_min_extrusion_temp = value;
347
347
settings.save ();
348
348
}
@@ -1083,11 +1083,13 @@ void DGUSScreenHandler::HandleAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr
1083
1083
skipVP = var.VP ; // don't overwrite value the next update time as the display might autoincrement in parallel
1084
1084
}
1085
1085
1086
- void DGUSScreenHandler::HandleGetExMinTemp_MKS (DGUS_VP_Variable &var, void *val_ptr) {
1087
- const uint16_t value_ex_min_temp = swap16 (*(uint16_t *)val_ptr);
1088
- thermalManager.extrude_min_temp = value_ex_min_temp;
1089
- skipVP = var.VP ; // don't overwrite value the next update time as the display might autoincrement in parallel
1090
- }
1086
+ #if ENABLED(PREVENT_COLD_EXTRUSION)
1087
+ void DGUSScreenHandler::HandleGetExMinTemp_MKS (DGUS_VP_Variable &var, void *val_ptr) {
1088
+ const uint16_t value_ex_min_temp = swap16 (*(uint16_t *)val_ptr);
1089
+ thermalManager.extrude_min_temp = value_ex_min_temp;
1090
+ skipVP = var.VP ; // don't overwrite value the next update time as the display might autoincrement in parallel
1091
+ }
1092
+ #endif
1091
1093
1092
1094
#if HAS_PID_HEATING
1093
1095
void DGUSScreenHandler::HandleTemperaturePIDChanged (DGUS_VP_Variable &var, void *val_ptr) {
@@ -1231,7 +1233,7 @@ void DGUSScreenHandler::MKS_FilamentLoadUnload(DGUS_VP_Variable &var, void *val_
1231
1233
break ;
1232
1234
}
1233
1235
1234
- #if HAS_HOTEND
1236
+ #if BOTH( HAS_HOTEND, PREVENT_COLD_EXTRUSION)
1235
1237
if (hotend_too_cold) {
1236
1238
if (thermalManager.targetTooColdToExtrude (hotend_too_cold - 1 )) thermalManager.setTargetHotend (thermalManager.extrude_min_temp , hotend_too_cold - 1 );
1237
1239
sendinfoscreen (PSTR (" NOTICE" ), nullptr , PSTR (" Please wait." ), PSTR (" Nozzle heating!" ), true , true , true , true );
@@ -1428,8 +1430,10 @@ bool DGUSScreenHandler::loop() {
1428
1430
#endif
1429
1431
#endif
1430
1432
1431
- if (mks_min_extrusion_temp != 0 )
1432
- thermalManager.extrude_min_temp = mks_min_extrusion_temp;
1433
+ #if ENABLED(PREVENT_COLD_EXTRUSION)
1434
+ if (mks_min_extrusion_temp != 0 )
1435
+ thermalManager.extrude_min_temp = mks_min_extrusion_temp;
1436
+ #endif
1433
1437
1434
1438
DGUS_ExtrudeLoadInit ();
1435
1439
0 commit comments