|
@@ -553,7 +553,7 @@ void lcd_set_home_offsets() {
|
553
|
553
|
|
554
|
554
|
static void _lcd_babystep(const int axis, const char* msg) {
|
555
|
555
|
ENCODER_DIRECTION_NORMAL();
|
556
|
|
- if (encoderPosition != 0) {
|
|
556
|
+ if (encoderPosition) {
|
557
|
557
|
int distance = (int)encoderPosition * BABYSTEP_MULTIPLICATOR;
|
558
|
558
|
encoderPosition = 0;
|
559
|
559
|
lcdDrawUpdate = LCD_DRAW_UPDATE_CALL_REDRAW;
|
|
@@ -1124,7 +1124,7 @@ float move_menu_scale;
|
1124
|
1124
|
|
1125
|
1125
|
static void _lcd_move(const char* name, AxisEnum axis, float min, float max) {
|
1126
|
1126
|
ENCODER_DIRECTION_NORMAL();
|
1127
|
|
- if ((encoderPosition != 0) && (movesplanned() <= 3)) {
|
|
1127
|
+ if (encoderPosition && movesplanned() <= 3) {
|
1128
|
1128
|
refresh_cmd_timeout();
|
1129
|
1129
|
current_position[axis] += float((int)encoderPosition) * move_menu_scale;
|
1130
|
1130
|
if (min_software_endstops) NOLESS(current_position[axis], min);
|
|
@@ -1156,7 +1156,7 @@ static void lcd_move_e(
|
1156
|
1156
|
unsigned short original_active_extruder = active_extruder;
|
1157
|
1157
|
active_extruder = e;
|
1158
|
1158
|
#endif
|
1159
|
|
- if ((encoderPosition != 0) && (movesplanned() <= 3)) {
|
|
1159
|
+ if (encoderPosition && movesplanned() <= 3) {
|
1160
|
1160
|
current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale;
|
1161
|
1161
|
encoderPosition = 0;
|
1162
|
1162
|
line_to_current(E_AXIS);
|
|
@@ -1203,13 +1203,22 @@ static void lcd_move_e(
|
1203
|
1203
|
*
|
1204
|
1204
|
*/
|
1205
|
1205
|
|
|
1206
|
+#if ENABLED(DELTA) || ENABLED(SCARA)
|
|
1207
|
+ #define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
|
|
1208
|
+#else
|
|
1209
|
+ #define _MOVE_XYZ_ALLOWED true
|
|
1210
|
+#endif
|
|
1211
|
+
|
1206
|
1212
|
static void _lcd_move_menu_axis() {
|
1207
|
1213
|
START_MENU();
|
1208
|
1214
|
MENU_ITEM(back, MSG_MOVE_AXIS);
|
1209
|
|
- MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
|
1210
|
|
- MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y);
|
|
1215
|
+
|
|
1216
|
+ if (_MOVE_XYZ_ALLOWED) {
|
|
1217
|
+ MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
|
|
1218
|
+ MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y);
|
|
1219
|
+ }
|
1211
|
1220
|
if (move_menu_scale < 10.0) {
|
1212
|
|
- MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
|
|
1221
|
+ if (_MOVE_XYZ_ALLOWED) MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
|
1213
|
1222
|
#if EXTRUDERS == 1
|
1214
|
1223
|
MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e);
|
1215
|
1224
|
#else
|
|
@@ -1248,7 +1257,10 @@ static void lcd_move_menu_01mm() {
|
1248
|
1257
|
static void lcd_move_menu() {
|
1249
|
1258
|
START_MENU();
|
1250
|
1259
|
MENU_ITEM(back, MSG_PREPARE);
|
1251
|
|
- MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
|
|
1260
|
+
|
|
1261
|
+ if (_MOVE_XYZ_ALLOWED)
|
|
1262
|
+ MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
|
|
1263
|
+
|
1252
|
1264
|
MENU_ITEM(submenu, MSG_MOVE_1MM, lcd_move_menu_1mm);
|
1253
|
1265
|
MENU_ITEM(submenu, MSG_MOVE_01MM, lcd_move_menu_01mm);
|
1254
|
1266
|
//TODO:X,Y,Z,E
|
|
@@ -1629,7 +1641,7 @@ static void lcd_control_volumetric_menu() {
|
1629
|
1641
|
#if ENABLED(HAS_LCD_CONTRAST)
|
1630
|
1642
|
static void lcd_set_contrast() {
|
1631
|
1643
|
ENCODER_DIRECTION_NORMAL();
|
1632
|
|
- if (encoderPosition != 0) {
|
|
1644
|
+ if (encoderPosition) {
|
1633
|
1645
|
#if ENABLED(U8GLIB_LM6059_AF)
|
1634
|
1646
|
lcd_contrast += encoderPosition;
|
1635
|
1647
|
lcd_contrast &= 0xFF;
|