|
@@ -25,34 +25,32 @@
|
25
|
25
|
#if ENABLED(ULTIPANEL)
|
26
|
26
|
|
27
|
27
|
#include "menu.h"
|
28
|
|
-
|
29
|
28
|
#include "../ultralcd.h"
|
30
|
29
|
#include "../../module/planner.h"
|
31
|
30
|
#include "../../module/motion.h"
|
32
|
|
-#include "../../module/probe.h"
|
33
|
|
-#include "../../module/printcounter.h"
|
34
|
|
-#include "../../gcode/gcode.h"
|
35
|
31
|
#include "../../gcode/queue.h"
|
36
|
|
-#include "../../module/configuration_store.h"
|
37
|
|
-#include "../../module/tool_change.h"
|
38
|
|
-#include "../../Marlin.h"
|
|
32
|
+#include "../../sd/cardreader.h"
|
39
|
33
|
|
40
|
|
-#include <stdarg.h>
|
|
34
|
+#if ENABLED(EEPROM_SETTINGS)
|
|
35
|
+ #include "../../module/configuration_store.h"
|
|
36
|
+#endif
|
|
37
|
+
|
|
38
|
+#if WATCH_HOTENDS || WATCH_THE_BED
|
|
39
|
+ #include "../../module/temperature.h"
|
|
40
|
+#endif
|
41
|
41
|
|
42
|
|
-#if ENABLED(SDSUPPORT)
|
43
|
|
- #include "../../sd/cardreader.h"
|
|
42
|
+#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
|
43
|
+ #include "../../module/probe.h"
|
|
44
|
+#endif
|
|
45
|
+
|
|
46
|
+#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) || ENABLED(AUTO_BED_LEVELING_UBL)
|
|
47
|
+ #include "../../feature/bedlevel/bedlevel.h"
|
44
|
48
|
#endif
|
45
|
49
|
|
46
|
50
|
////////////////////////////////////////////
|
47
|
51
|
///////////// Global Variables /////////////
|
48
|
52
|
////////////////////////////////////////////
|
49
|
53
|
|
50
|
|
-// Buttons
|
51
|
|
-volatile uint8_t buttons;
|
52
|
|
-#if ENABLED(REPRAPWORLD_KEYPAD)
|
53
|
|
- volatile uint8_t buttons_reprapworld_keypad;
|
54
|
|
-#endif
|
55
|
|
-
|
56
|
54
|
// Menu Navigation
|
57
|
55
|
int8_t encoderTopLine;
|
58
|
56
|
typedef struct {
|
|
@@ -70,12 +68,9 @@ int32_t minEditValue, maxEditValue;
|
70
|
68
|
screenFunc_t callbackFunc;
|
71
|
69
|
bool liveEdit;
|
72
|
70
|
|
|
71
|
+// Prevent recursion into screen handlers
|
73
|
72
|
bool no_reentry = false;
|
74
|
73
|
|
75
|
|
-// Initialized by settings.load()
|
76
|
|
-int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2];
|
77
|
|
-uint8_t lcd_preheat_fan_speed[2];
|
78
|
|
-
|
79
|
74
|
////////////////////////////////////////////
|
80
|
75
|
//////// Menu Navigation & History /////////
|
81
|
76
|
////////////////////////////////////////////
|
|
@@ -110,7 +105,7 @@ void lcd_goto_previous_menu_no_defer() {
|
110
|
105
|
}
|
111
|
106
|
|
112
|
107
|
////////////////////////////////////////////
|
113
|
|
-/////////////// Menu Actions ///////////////
|
|
108
|
+/////////// Common Menu Actions ////////////
|
114
|
109
|
////////////////////////////////////////////
|
115
|
110
|
|
116
|
111
|
void _menu_action_back() { lcd_goto_previous_menu(); }
|
|
@@ -355,14 +350,14 @@ void lcd_completion_feedback(const bool good/*=true*/) {
|
355
|
350
|
else lcd_buzz(20, 440);
|
356
|
351
|
}
|
357
|
352
|
|
358
|
|
-inline void line_to_current_z() {
|
359
|
|
- planner.buffer_line(current_position, MMM_TO_MMS(manual_feedrate_mm_m[Z_AXIS]), active_extruder);
|
360
|
|
-}
|
|
353
|
+#if HAS_LINE_TO_Z
|
361
|
354
|
|
362
|
|
-void line_to_z(const float &z) {
|
363
|
|
- current_position[Z_AXIS] = z;
|
364
|
|
- line_to_current_z();
|
365
|
|
-}
|
|
355
|
+ void line_to_z(const float &z) {
|
|
356
|
+ current_position[Z_AXIS] = z;
|
|
357
|
+ planner.buffer_line(current_position, MMM_TO_MMS(manual_feedrate_mm_m[Z_AXIS]), active_extruder);
|
|
358
|
+ }
|
|
359
|
+
|
|
360
|
+#endif
|
366
|
361
|
|
367
|
362
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
368
|
363
|
|