Преглед изворни кода

Move Tune Menu to its own file

Scott Lahteine пре 6 година
родитељ
комит
143d4ec043
2 измењених фајлова са 241 додато и 213 уклоњено
  1. 35
    213
      Marlin/src/lcd/menu/menu.cpp
  2. 206
    0
      Marlin/src/lcd/menu/menu_tune.cpp

+ 35
- 213
Marlin/src/lcd/menu/menu.cpp Прегледај датотеку

@@ -308,10 +308,6 @@ void menu_advanced_settings();
308 308
   void _lcd_set_z_fade_height() { set_z_fade_height(lcd_z_fade_height); }
309 309
 #endif
310 310
 
311
-#if ENABLED(BABYSTEPPING)
312
-  long babysteps_done = 0;
313
-#endif
314
-
315 311
 bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING(); }
316 312
 
317 313
 float move_menu_scale;
@@ -740,93 +736,57 @@ void line_to_z(const float &z) {
740 736
 
741 737
 #endif
742 738
 
743
-/**
744
- *
745
- * "Tune" submenu items
746
- *
747
- */
748
-
749
-#if ENABLED(BABYSTEPPING)
739
+#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
750 740
 
751
-  void _lcd_babystep(const AxisEnum axis, PGM_P msg) {
741
+  void lcd_babystep_zoffset() {
752 742
     if (use_click()) { return lcd_goto_previous_menu_no_defer(); }
743
+    defer_return_to_status = true;
744
+    #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
745
+      const bool do_probe = (active_extruder == 0);
746
+    #else
747
+      constexpr bool do_probe = true;
748
+    #endif
753 749
     ENCODER_DIRECTION_NORMAL();
754 750
     if (encoderPosition) {
755 751
       const int16_t babystep_increment = (int32_t)encoderPosition * (BABYSTEP_MULTIPLICATOR);
756 752
       encoderPosition = 0;
757
-      lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
758
-      thermalManager.babystep_axis(axis, babystep_increment);
759
-      babysteps_done += babystep_increment;
760
-    }
761
-    if (lcdDrawUpdate)
762
-      lcd_implementation_drawedit(msg, ftostr43sign(planner.steps_to_mm[axis] * babysteps_done));
763
-  }
764
-
765
-  #if ENABLED(BABYSTEP_XY)
766
-    void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEP_X)); }
767
-    void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEP_Y)); }
768
-    void lcd_babystep_x() { lcd_goto_screen(_lcd_babystep_x); babysteps_done = 0; defer_return_to_status = true; }
769
-    void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; }
770
-  #endif
771 753
 
772
-  #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
754
+      const float diff = planner.steps_to_mm[Z_AXIS] * babystep_increment,
755
+                  new_probe_offset = zprobe_zoffset + diff,
756
+                  new_offs =
757
+                    #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
758
+                      do_probe ? new_probe_offset : hotend_offset[Z_AXIS][active_extruder] - diff
759
+                    #else
760
+                      new_probe_offset
761
+                    #endif
762
+                  ;
763
+      if (WITHIN(new_offs, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
773 764
 
774
-    void lcd_babystep_zoffset() {
775
-      if (use_click()) { return lcd_goto_previous_menu_no_defer(); }
776
-      defer_return_to_status = true;
777
-      #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
778
-        const bool do_probe = (active_extruder == 0);
779
-      #else
780
-        constexpr bool do_probe = true;
781
-      #endif
782
-      ENCODER_DIRECTION_NORMAL();
783
-      if (encoderPosition) {
784
-        const int16_t babystep_increment = (int32_t)encoderPosition * (BABYSTEP_MULTIPLICATOR);
785
-        encoderPosition = 0;
786
-
787
-        const float diff = planner.steps_to_mm[Z_AXIS] * babystep_increment,
788
-                    new_probe_offset = zprobe_zoffset + diff,
789
-                    new_offs =
790
-                      #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
791
-                        do_probe ? new_probe_offset : hotend_offset[Z_AXIS][active_extruder] - diff
792
-                      #else
793
-                        new_probe_offset
794
-                      #endif
795
-                    ;
796
-        if (WITHIN(new_offs, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
797
-
798
-          thermalManager.babystep_axis(Z_AXIS, babystep_increment);
799
-
800
-          if (do_probe) zprobe_zoffset = new_offs;
801
-          #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
802
-            else hotend_offset[Z_AXIS][active_extruder] = new_offs;
803
-          #endif
765
+        thermalManager.babystep_axis(Z_AXIS, babystep_increment);
804 766
 
805
-          lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
806
-        }
807
-      }
808
-      if (lcdDrawUpdate) {
767
+        if (do_probe) zprobe_zoffset = new_offs;
809 768
         #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
810
-          if (!do_probe)
811
-            lcd_implementation_drawedit(PSTR(MSG_IDEX_Z_OFFSET), ftostr43sign(hotend_offset[Z_AXIS][active_extruder]));
812
-          else
769
+          else hotend_offset[Z_AXIS][active_extruder] = new_offs;
813 770
         #endif
814
-            lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
815 771
 
816
-        #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
817
-          if (do_probe) _lcd_zoffset_overlay_gfx(zprobe_zoffset);
818
-        #endif
772
+        lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
819 773
       }
820 774
     }
775
+    if (lcdDrawUpdate) {
776
+      #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
777
+        if (!do_probe)
778
+          lcd_implementation_drawedit(PSTR(MSG_IDEX_Z_OFFSET), ftostr43sign(hotend_offset[Z_AXIS][active_extruder]));
779
+        else
780
+      #endif
781
+          lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
821 782
 
822
-  #else // !BABYSTEP_ZPROBE_OFFSET
823
-
824
-    void _lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEP_Z)); }
825
-    void lcd_babystep_z() { lcd_goto_screen(_lcd_babystep_z); babysteps_done = 0; defer_return_to_status = true; }
826
-
827
-  #endif // !BABYSTEP_ZPROBE_OFFSET
783
+      #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
784
+        if (do_probe) _lcd_zoffset_overlay_gfx(zprobe_zoffset);
785
+      #endif
786
+    }
787
+  }
828 788
 
829
-#endif // BABYSTEPPING
789
+#endif // BABYSTEP_ZPROBE_OFFSET
830 790
 
831 791
 #if ENABLED(AUTO_BED_LEVELING_UBL)
832 792
 
@@ -923,144 +883,6 @@ void watch_temp_callback_bed() {
923 883
   #endif
924 884
 }
925 885
 
926
-// Refresh the E factor after changing flow
927
-inline void _lcd_refresh_e_factor_0() { planner.refresh_e_factor(0); }
928
-#if EXTRUDERS > 1
929
-  inline void _lcd_refresh_e_factor() { planner.refresh_e_factor(active_extruder); }
930
-  inline void _lcd_refresh_e_factor_1() { planner.refresh_e_factor(1); }
931
-  #if EXTRUDERS > 2
932
-    inline void _lcd_refresh_e_factor_2() { planner.refresh_e_factor(2); }
933
-    #if EXTRUDERS > 3
934
-      inline void _lcd_refresh_e_factor_3() { planner.refresh_e_factor(3); }
935
-      #if EXTRUDERS > 4
936
-        inline void _lcd_refresh_e_factor_4() { planner.refresh_e_factor(4); }
937
-        #if EXTRUDERS > 5
938
-          inline void _lcd_refresh_e_factor_5() { planner.refresh_e_factor(5); }
939
-        #endif // EXTRUDERS > 5
940
-      #endif // EXTRUDERS > 4
941
-    #endif // EXTRUDERS > 3
942
-  #endif // EXTRUDERS > 2
943
-#endif // EXTRUDERS > 1
944
-
945
-/**
946
- *
947
- * "Tune" submenu
948
- *
949
- */
950
-void menu_tune() {
951
-  START_MENU();
952
-  MENU_BACK(MSG_MAIN);
953
-
954
-  //
955
-  // Speed:
956
-  //
957
-  MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999);
958
-
959
-  //
960
-  // Manual bed leveling, Bed Z:
961
-  //
962
-  #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)
963
-    MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
964
-  #endif
965
-
966
-  //
967
-  // Nozzle:
968
-  // Nozzle [1-4]:
969
-  //
970
-  #if HOTENDS == 1
971
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
972
-  #else // HOTENDS > 1
973
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
974
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
975
-    #if HOTENDS > 2
976
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
977
-      #if HOTENDS > 3
978
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
979
-        #if HOTENDS > 4
980
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N5, &thermalManager.target_temperature[4], 0, HEATER_4_MAXTEMP - 15, watch_temp_callback_E4);
981
-          #if HOTENDS > 5
982
-            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N6, &thermalManager.target_temperature[5], 0, HEATER_5_MAXTEMP - 15, watch_temp_callback_E5);
983
-          #endif // HOTENDS > 5
984
-        #endif // HOTENDS > 4
985
-      #endif // HOTENDS > 3
986
-    #endif // HOTENDS > 2
987
-  #endif // HOTENDS > 1
988
-
989
-  //
990
-  // Bed:
991
-  //
992
-  #if HAS_HEATED_BED
993
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
994
-  #endif
995
-
996
-  //
997
-  // Fan Speed:
998
-  //
999
-  #if FAN_COUNT > 0
1000
-    #if HAS_FAN0
1001
-      MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &fan_speed[0], 0, 255);
1002
-      #if ENABLED(EXTRA_FAN_SPEED)
1003
-        MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &new_fan_speed[0], 3, 255);
1004
-      #endif
1005
-    #endif
1006
-    #if HAS_FAN1
1007
-      MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_FAN_SPEED " 2", &fan_speed[1], 0, 255);
1008
-      #if ENABLED(EXTRA_FAN_SPEED)
1009
-        MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_EXTRA_FAN_SPEED " 2", &new_fan_speed[1], 3, 255);
1010
-      #endif
1011
-    #endif
1012
-    #if HAS_FAN2
1013
-      MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_FAN_SPEED " 3", &fan_speed[2], 0, 255);
1014
-      #if ENABLED(EXTRA_FAN_SPEED)
1015
-        MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_EXTRA_FAN_SPEED " 3", &new_fan_speed[2], 3, 255);
1016
-      #endif
1017
-    #endif
1018
-  #endif // FAN_COUNT > 0
1019
-
1020
-  //
1021
-  // Flow:
1022
-  // Flow [1-5]:
1023
-  //
1024
-  #if EXTRUDERS == 1
1025
-    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
1026
-  #else // EXTRUDERS > 1
1027
-    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, _lcd_refresh_e_factor);
1028
-    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N1, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
1029
-    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N2, &planner.flow_percentage[1], 10, 999, _lcd_refresh_e_factor_1);
1030
-    #if EXTRUDERS > 2
1031
-      MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N3, &planner.flow_percentage[2], 10, 999, _lcd_refresh_e_factor_2);
1032
-      #if EXTRUDERS > 3
1033
-        MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N4, &planner.flow_percentage[3], 10, 999, _lcd_refresh_e_factor_3);
1034
-        #if EXTRUDERS > 4
1035
-          MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N5, &planner.flow_percentage[4], 10, 999, _lcd_refresh_e_factor_4);
1036
-          #if EXTRUDERS > 5
1037
-            MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N6, &planner.flow_percentage[5], 10, 999, _lcd_refresh_e_factor_5);
1038
-          #endif // EXTRUDERS > 5
1039
-        #endif // EXTRUDERS > 4
1040
-      #endif // EXTRUDERS > 3
1041
-    #endif // EXTRUDERS > 2
1042
-  #endif // EXTRUDERS > 1
1043
-
1044
-  //
1045
-  // Babystep X:
1046
-  // Babystep Y:
1047
-  // Babystep Z:
1048
-  //
1049
-  #if ENABLED(BABYSTEPPING)
1050
-    #if ENABLED(BABYSTEP_XY)
1051
-      MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_babystep_x);
1052
-      MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_babystep_y);
1053
-    #endif
1054
-    #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
1055
-      MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
1056
-    #else
1057
-      MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
1058
-    #endif
1059
-  #endif
1060
-
1061
-  END_MENU();
1062
-}
1063
-
1064 886
 /**
1065 887
  *
1066 888
  * "Driver current control" submenu items

+ 206
- 0
Marlin/src/lcd/menu/menu_tune.cpp Прегледај датотеку

@@ -0,0 +1,206 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+//
24
+// Tune Menu
25
+//
26
+
27
+#include "../../inc/MarlinConfigPre.h"
28
+
29
+#if HAS_LCD_MENU
30
+
31
+#include "menu.h"
32
+#include "../../module/motion.h"
33
+#include "../../module/planner.h"
34
+#include "../../module/temperature.h"
35
+#include "../../Marlin.h"
36
+
37
+#if HAS_LEVELING
38
+  #include "../../feature/bedlevel/bedlevel.h"
39
+#endif
40
+
41
+// Refresh the E factor after changing flow
42
+void _lcd_refresh_e_factor_0() { planner.refresh_e_factor(0); }
43
+#if EXTRUDERS > 1
44
+  void _lcd_refresh_e_factor() { planner.refresh_e_factor(active_extruder); }
45
+  void _lcd_refresh_e_factor_1() { planner.refresh_e_factor(1); }
46
+  #if EXTRUDERS > 2
47
+    void _lcd_refresh_e_factor_2() { planner.refresh_e_factor(2); }
48
+    #if EXTRUDERS > 3
49
+      void _lcd_refresh_e_factor_3() { planner.refresh_e_factor(3); }
50
+      #if EXTRUDERS > 4
51
+        void _lcd_refresh_e_factor_4() { planner.refresh_e_factor(4); }
52
+        #if EXTRUDERS > 5
53
+          void _lcd_refresh_e_factor_5() { planner.refresh_e_factor(5); }
54
+        #endif // EXTRUDERS > 5
55
+      #endif // EXTRUDERS > 4
56
+    #endif // EXTRUDERS > 3
57
+  #endif // EXTRUDERS > 2
58
+#endif // EXTRUDERS > 1
59
+
60
+#if ENABLED(BABYSTEPPING)
61
+
62
+  long babysteps_done = 0;
63
+
64
+  void _lcd_babystep(const AxisEnum axis, PGM_P msg) {
65
+    if (use_click()) { return lcd_goto_previous_menu_no_defer(); }
66
+    ENCODER_DIRECTION_NORMAL();
67
+    if (encoderPosition) {
68
+      const int16_t babystep_increment = (int32_t)encoderPosition * (BABYSTEP_MULTIPLICATOR);
69
+      encoderPosition = 0;
70
+      lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
71
+      thermalManager.babystep_axis(axis, babystep_increment);
72
+      babysteps_done += babystep_increment;
73
+    }
74
+    if (lcdDrawUpdate)
75
+      lcd_implementation_drawedit(msg, ftostr43sign(planner.steps_to_mm[axis] * babysteps_done));
76
+  }
77
+
78
+  #if ENABLED(BABYSTEP_XY)
79
+    void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEP_X)); }
80
+    void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEP_Y)); }
81
+    void lcd_babystep_x() { lcd_goto_screen(_lcd_babystep_x); babysteps_done = 0; defer_return_to_status = true; }
82
+    void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; }
83
+  #endif
84
+
85
+  #if DISABLED(BABYSTEP_ZPROBE_OFFSET)
86
+    void _lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEP_Z)); }
87
+    void lcd_babystep_z() { lcd_goto_screen(_lcd_babystep_z); babysteps_done = 0; defer_return_to_status = true; }
88
+  #endif
89
+
90
+#endif // BABYSTEPPING
91
+
92
+void menu_tune() {
93
+  START_MENU();
94
+  MENU_BACK(MSG_MAIN);
95
+
96
+  //
97
+  // Speed:
98
+  //
99
+  MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999);
100
+
101
+  //
102
+  // Manual bed leveling, Bed Z:
103
+  //
104
+  #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)
105
+    MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
106
+  #endif
107
+
108
+  //
109
+  // Nozzle:
110
+  // Nozzle [1-4]:
111
+  //
112
+  #if HOTENDS == 1
113
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
114
+  #else // HOTENDS > 1
115
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
116
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
117
+    #if HOTENDS > 2
118
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
119
+      #if HOTENDS > 3
120
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
121
+        #if HOTENDS > 4
122
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N5, &thermalManager.target_temperature[4], 0, HEATER_4_MAXTEMP - 15, watch_temp_callback_E4);
123
+          #if HOTENDS > 5
124
+            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N6, &thermalManager.target_temperature[5], 0, HEATER_5_MAXTEMP - 15, watch_temp_callback_E5);
125
+          #endif // HOTENDS > 5
126
+        #endif // HOTENDS > 4
127
+      #endif // HOTENDS > 3
128
+    #endif // HOTENDS > 2
129
+  #endif // HOTENDS > 1
130
+
131
+  //
132
+  // Bed:
133
+  //
134
+  #if HAS_HEATED_BED
135
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
136
+  #endif
137
+
138
+  //
139
+  // Fan Speed:
140
+  //
141
+  #if FAN_COUNT > 0
142
+    #if HAS_FAN0
143
+      MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &fan_speed[0], 0, 255);
144
+      #if ENABLED(EXTRA_FAN_SPEED)
145
+        MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &new_fan_speed[0], 3, 255);
146
+      #endif
147
+    #endif
148
+    #if HAS_FAN1
149
+      MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_FAN_SPEED " 2", &fan_speed[1], 0, 255);
150
+      #if ENABLED(EXTRA_FAN_SPEED)
151
+        MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_EXTRA_FAN_SPEED " 2", &new_fan_speed[1], 3, 255);
152
+      #endif
153
+    #endif
154
+    #if HAS_FAN2
155
+      MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_FAN_SPEED " 3", &fan_speed[2], 0, 255);
156
+      #if ENABLED(EXTRA_FAN_SPEED)
157
+        MENU_MULTIPLIER_ITEM_EDIT(int8, MSG_EXTRA_FAN_SPEED " 3", &new_fan_speed[2], 3, 255);
158
+      #endif
159
+    #endif
160
+  #endif // FAN_COUNT > 0
161
+
162
+  //
163
+  // Flow:
164
+  // Flow [1-5]:
165
+  //
166
+  #if EXTRUDERS == 1
167
+    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
168
+  #else // EXTRUDERS > 1
169
+    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, _lcd_refresh_e_factor);
170
+    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N1, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
171
+    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N2, &planner.flow_percentage[1], 10, 999, _lcd_refresh_e_factor_1);
172
+    #if EXTRUDERS > 2
173
+      MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N3, &planner.flow_percentage[2], 10, 999, _lcd_refresh_e_factor_2);
174
+      #if EXTRUDERS > 3
175
+        MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N4, &planner.flow_percentage[3], 10, 999, _lcd_refresh_e_factor_3);
176
+        #if EXTRUDERS > 4
177
+          MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N5, &planner.flow_percentage[4], 10, 999, _lcd_refresh_e_factor_4);
178
+          #if EXTRUDERS > 5
179
+            MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N6, &planner.flow_percentage[5], 10, 999, _lcd_refresh_e_factor_5);
180
+          #endif // EXTRUDERS > 5
181
+        #endif // EXTRUDERS > 4
182
+      #endif // EXTRUDERS > 3
183
+    #endif // EXTRUDERS > 2
184
+  #endif // EXTRUDERS > 1
185
+
186
+  //
187
+  // Babystep X:
188
+  // Babystep Y:
189
+  // Babystep Z:
190
+  //
191
+  #if ENABLED(BABYSTEPPING)
192
+    #if ENABLED(BABYSTEP_XY)
193
+      MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_babystep_x);
194
+      MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_babystep_y);
195
+    #endif
196
+    #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
197
+      MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
198
+    #else
199
+      MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
200
+    #endif
201
+  #endif
202
+
203
+  END_MENU();
204
+}
205
+
206
+#endif // HAS_LCD_MENU

Loading…
Откажи
Сачувај