|
@@ -35,27 +35,29 @@ using namespace ExtUI;
|
35
|
35
|
using namespace Theme;
|
36
|
36
|
|
37
|
37
|
#ifdef TOUCH_UI_PORTRAIT
|
38
|
|
- #define GRID_ROWS 9
|
|
38
|
+ #define GRID_ROWS 10
|
39
|
39
|
#define GRID_COLS 2
|
40
|
40
|
#define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1)
|
41
|
41
|
#define LEVEL_BED_POS BTN_POS(1,2), BTN_SIZE(2,1)
|
42
|
42
|
#define LEVEL_AXIS_POS BTN_POS(1,3), BTN_SIZE(2,1)
|
43
|
|
- #define SHOW_MESH_POS BTN_POS(1,4), BTN_SIZE(2,1)
|
44
|
|
- #define BLTOUCH_TITLE_POS BTN_POS(1,6), BTN_SIZE(2,1)
|
45
|
|
- #define BLTOUCH_RESET_POS BTN_POS(1,7), BTN_SIZE(1,1)
|
46
|
|
- #define BLTOUCH_TEST_POS BTN_POS(2,7), BTN_SIZE(1,1)
|
47
|
|
- #define BACK_POS BTN_POS(1,9), BTN_SIZE(2,1)
|
|
43
|
+ #define Z_AUTO_ALIGN_POS BTN_POS(1,4), BTN_SIZE(2,1)
|
|
44
|
+ #define SHOW_MESH_POS BTN_POS(1,5), BTN_SIZE(2,1)
|
|
45
|
+ #define BLTOUCH_TITLE_POS BTN_POS(1,7), BTN_SIZE(2,1)
|
|
46
|
+ #define BLTOUCH_RESET_POS BTN_POS(1,8), BTN_SIZE(1,1)
|
|
47
|
+ #define BLTOUCH_TEST_POS BTN_POS(2,8), BTN_SIZE(1,1)
|
|
48
|
+ #define BACK_POS BTN_POS(1,10), BTN_SIZE(2,1)
|
48
|
49
|
#else
|
49
|
|
- #define GRID_ROWS 7
|
|
50
|
+ #define GRID_ROWS 8
|
50
|
51
|
#define GRID_COLS 2
|
51
|
52
|
#define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1)
|
52
|
53
|
#define LEVEL_BED_POS BTN_POS(1,2), BTN_SIZE(2,1)
|
53
|
54
|
#define LEVEL_AXIS_POS BTN_POS(1,3), BTN_SIZE(2,1)
|
54
|
|
- #define SHOW_MESH_POS BTN_POS(1,4), BTN_SIZE(2,1)
|
55
|
|
- #define BLTOUCH_TITLE_POS BTN_POS(1,5), BTN_SIZE(2,1)
|
56
|
|
- #define BLTOUCH_RESET_POS BTN_POS(1,6), BTN_SIZE(1,1)
|
57
|
|
- #define BLTOUCH_TEST_POS BTN_POS(2,6), BTN_SIZE(1,1)
|
58
|
|
- #define BACK_POS BTN_POS(1,7), BTN_SIZE(2,1)
|
|
55
|
+ #define Z_AUTO_ALIGN_POS BTN_POS(1,4), BTN_SIZE(2,1)
|
|
56
|
+ #define SHOW_MESH_POS BTN_POS(1,5), BTN_SIZE(2,1)
|
|
57
|
+ #define BLTOUCH_TITLE_POS BTN_POS(1,6), BTN_SIZE(2,1)
|
|
58
|
+ #define BLTOUCH_RESET_POS BTN_POS(1,7), BTN_SIZE(1,1)
|
|
59
|
+ #define BLTOUCH_TEST_POS BTN_POS(2,7), BTN_SIZE(1,1)
|
|
60
|
+ #define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1)
|
59
|
61
|
#endif
|
60
|
62
|
|
61
|
63
|
void LevelingMenu::onRedraw(draw_mode_t what) {
|
|
@@ -78,12 +80,14 @@ void LevelingMenu::onRedraw(draw_mode_t what) {
|
78
|
80
|
#endif
|
79
|
81
|
)
|
80
|
82
|
.tag(3).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_AUTOLEVEL_X_AXIS))
|
|
83
|
+ .enabled(ENABLED(Z_STEPPER_AUTO_ALIGN))
|
|
84
|
+ .tag(4).button(Z_AUTO_ALIGN_POS, GET_TEXT_F(MSG_AUTO_Z_ALIGN))
|
81
|
85
|
.enabled(ENABLED(HAS_MESH))
|
82
|
|
- .tag(4).button(SHOW_MESH_POS, GET_TEXT_F(MSG_SHOW_MESH));
|
|
86
|
+ .tag(5).button(SHOW_MESH_POS, GET_TEXT_F(MSG_SHOW_MESH));
|
83
|
87
|
#if ENABLED(BLTOUCH)
|
84
|
88
|
cmd.text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH))
|
85
|
|
- .tag(5).button(BLTOUCH_RESET_POS, GET_TEXT_F(MSG_BLTOUCH_RESET))
|
86
|
|
- .tag(6).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST));
|
|
89
|
+ .tag(6).button(BLTOUCH_RESET_POS, GET_TEXT_F(MSG_BLTOUCH_RESET))
|
|
90
|
+ .tag(7).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST));
|
87
|
91
|
#endif
|
88
|
92
|
cmd.colors(action_btn)
|
89
|
93
|
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
|
|
@@ -103,12 +107,15 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
|
103
|
107
|
#ifdef AXIS_LEVELING_COMMANDS
|
104
|
108
|
case 3: SpinnerDialogBox::enqueueAndWait_P(F(AXIS_LEVELING_COMMANDS)); break;
|
105
|
109
|
#endif
|
|
110
|
+ #if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
|
111
|
+ case 4: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break;
|
|
112
|
+ #endif
|
106
|
113
|
#if HAS_MESH
|
107
|
|
- case 4: GOTO_SCREEN(BedMeshScreen); break;
|
|
114
|
+ case 5: GOTO_SCREEN(BedMeshScreen); break;
|
108
|
115
|
#endif
|
109
|
116
|
#if ENABLED(BLTOUCH)
|
110
|
|
- case 5: injectCommands_P(PSTR("M280 P0 S60")); break;
|
111
|
|
- case 6: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break;
|
|
117
|
+ case 6: injectCommands_P(PSTR("M280 P0 S60")); break;
|
|
118
|
+ case 7: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break;
|
112
|
119
|
#endif
|
113
|
120
|
default: return false;
|
114
|
121
|
}
|