Browse Source

🩹 Fix lcd_preheat compile

Scott Lahteine 3 years ago
parent
commit
90b5645223

+ 4
- 0
Marlin/src/inc/SanityCheck.h View File

913
   #error "SD_REPRINT_LAST_SELECTED_FILE currently requires a Marlin-native LCD menu."
913
   #error "SD_REPRINT_LAST_SELECTED_FILE currently requires a Marlin-native LCD menu."
914
 #endif
914
 #endif
915
 
915
 
916
+#if ANY(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE, EXTENSIBLE_UI) && !defined(MANUAL_FEEDRATE)
917
+  #error "MANUAL_FEEDRATE is required for MarlinUI, ExtUI, or FTDI EVE Touch UI."
918
+#endif
919
+
916
 /**
920
 /**
917
  * Custom Boot and Status screens
921
  * Custom Boot and Status screens
918
  */
922
  */

+ 5
- 3
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp View File

606
       break;
606
       break;
607
     #endif
607
     #endif
608
 
608
 
609
-    case VP_BED_CONTROL:
610
-      preheat_temp = PREHEAT_1_TEMP_BED;
611
-      break;
609
+    #if HAS_HEATED_BED
610
+      case VP_BED_CONTROL:
611
+        preheat_temp = PREHEAT_1_TEMP_BED;
612
+        break;
613
+    #endif
612
   }
614
   }
613
 
615
 
614
   *(int16_t*)var.memadr = *(int16_t*)var.memadr > 0 ? 0 : preheat_temp;
616
   *(int16_t*)var.memadr = *(int16_t*)var.memadr > 0 ? 0 : preheat_temp;

+ 1
- 1
Marlin/src/lcd/extui/ui_api.cpp View File

1076
   void coolDown() { thermalManager.cooldown(); }
1076
   void coolDown() { thermalManager.cooldown(); }
1077
 
1077
 
1078
   bool awaitingUserConfirm() {
1078
   bool awaitingUserConfirm() {
1079
-    return TERN0(HAS_RESUME_CONTINUE, wait_for_user) || getHostKeepaliveIsPaused();
1079
+    return TERN0(HAS_RESUME_CONTINUE, wait_for_user) || TERN0(HOST_KEEPALIVE_FEATURE, getHostKeepaliveIsPaused());
1080
   }
1080
   }
1081
   void setUserConfirmed() { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); }
1081
   void setUserConfirmed() { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); }
1082
 
1082
 

+ 5
- 3
Marlin/src/lcd/menu/menu_filament.cpp View File

65
   queue.inject(cmd);
65
   queue.inject(cmd);
66
 }
66
 }
67
 
67
 
68
-static void _change_filament_with_preset() {
69
-  _change_filament_with_temp(ui.material_preset[MenuItemBase::itemIndex].hotend_temp);
70
-}
68
+#if HAS_PREHEAT
69
+  static void _change_filament_with_preset() {
70
+    _change_filament_with_temp(ui.material_preset[MenuItemBase::itemIndex].hotend_temp);
71
+  }
72
+#endif
71
 
73
 
72
 static void _change_filament_with_custom() {
74
 static void _change_filament_with_custom() {
73
   _change_filament_with_temp(thermalManager.degTargetHotend(MenuItemBase::itemIndex));
75
   _change_filament_with_temp(thermalManager.degTargetHotend(MenuItemBase::itemIndex));

+ 22
- 22
Marlin/src/lcd/menu/menu_temperature.cpp View File

47
 // "Temperature" submenu items
47
 // "Temperature" submenu items
48
 //
48
 //
49
 
49
 
50
-void Temperature::lcd_preheat(const uint8_t e, const int8_t indh, const int8_t indb) {
51
-  UNUSED(e); UNUSED(indh); UNUSED(indb);
52
-  #if HAS_HOTEND
53
-    if (indh >= 0 && ui.material_preset[indh].hotend_temp > 0)
54
-      setTargetHotend(_MIN(thermalManager.hotend_max_target(e), ui.material_preset[indh].hotend_temp), e);
55
-  #endif
56
-  #if HAS_HEATED_BED
57
-    if (indb >= 0 && ui.material_preset[indb].bed_temp > 0) setTargetBed(ui.material_preset[indb].bed_temp);
58
-  #endif
59
-  #if HAS_FAN
60
-    if (indh >= 0) {
61
-      const uint8_t fan_index = active_extruder < (FAN_COUNT) ? active_extruder : 0;
62
-      if (true
63
-        #if REDUNDANT_PART_COOLING_FAN
64
-          && fan_index != REDUNDANT_PART_COOLING_FAN
65
-        #endif
66
-      ) set_fan_speed(fan_index, ui.material_preset[indh].fan_speed);
67
-    }
68
-  #endif
69
-  ui.return_to_status();
70
-}
71
-
72
 #if HAS_PREHEAT
50
 #if HAS_PREHEAT
73
 
51
 
52
+  void Temperature::lcd_preheat(const uint8_t e, const int8_t indh, const int8_t indb) {
53
+    UNUSED(e); UNUSED(indh); UNUSED(indb);
54
+    #if HAS_HOTEND
55
+      if (indh >= 0 && ui.material_preset[indh].hotend_temp > 0)
56
+        setTargetHotend(_MIN(thermalManager.hotend_max_target(e), ui.material_preset[indh].hotend_temp), e);
57
+    #endif
58
+    #if HAS_HEATED_BED
59
+      if (indb >= 0 && ui.material_preset[indb].bed_temp > 0) setTargetBed(ui.material_preset[indb].bed_temp);
60
+    #endif
61
+    #if HAS_FAN
62
+      if (indh >= 0) {
63
+        const uint8_t fan_index = active_extruder < (FAN_COUNT) ? active_extruder : 0;
64
+        if (true
65
+          #if REDUNDANT_PART_COOLING_FAN
66
+            && fan_index != REDUNDANT_PART_COOLING_FAN
67
+          #endif
68
+        ) set_fan_speed(fan_index, ui.material_preset[indh].fan_speed);
69
+      }
70
+    #endif
71
+    ui.return_to_status();
72
+  }
73
+
74
   #if HAS_TEMP_HOTEND
74
   #if HAS_TEMP_HOTEND
75
     inline void _preheat_end(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, -1); }
75
     inline void _preheat_end(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, -1); }
76
     void do_preheat_end_m() { _preheat_end(editable.int8, 0); }
76
     void do_preheat_end_m() { _preheat_end(editable.int8, 0); }

+ 1
- 1
Marlin/src/module/temperature.h View File

1016
       static void set_heating_message(const uint8_t, const bool=false) {}
1016
       static void set_heating_message(const uint8_t, const bool=false) {}
1017
     #endif
1017
     #endif
1018
 
1018
 
1019
-    #if HAS_MARLINUI_MENU && HAS_TEMPERATURE
1019
+    #if HAS_MARLINUI_MENU && HAS_TEMPERATURE && HAS_PREHEAT
1020
       static void lcd_preheat(const uint8_t e, const int8_t indh, const int8_t indb);
1020
       static void lcd_preheat(const uint8_t e, const int8_t indh, const int8_t indb);
1021
     #endif
1021
     #endif
1022
 
1022
 

Loading…
Cancel
Save