2018-10-27 23:45:37 +02:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 15:00:57 +01:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2018-10-27 23:45:37 +02:00
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
2019-06-28 06:57:50 +02:00
|
|
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
2018-10-27 23:45:37 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2020-07-23 05:20:14 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2018-10-27 23:45:37 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
//
|
|
|
|
// Motion Menu
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "../../inc/MarlinConfigPre.h"
|
|
|
|
|
|
|
|
#if HAS_LCD_MENU
|
|
|
|
|
|
|
|
#include "menu.h"
|
2019-10-26 02:49:48 +02:00
|
|
|
#include "menu_addon.h"
|
2019-07-30 09:16:26 +02:00
|
|
|
|
2018-10-27 23:45:37 +02:00
|
|
|
#include "../../module/motion.h"
|
|
|
|
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#include "../../module/delta.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
|
|
|
#include "../../module/temperature.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAS_LEVELING
|
|
|
|
#include "../../module/planner.h"
|
|
|
|
#include "../../feature/bedlevel/bedlevel.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ENABLED(MANUAL_E_MOVES_RELATIVE)
|
|
|
|
float manual_move_e_origin = 0;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// "Motion" > "Move Axis" submenu
|
|
|
|
//
|
|
|
|
|
2019-11-15 03:30:30 +01:00
|
|
|
static void _lcd_move_xyz(PGM_P const name, const AxisEnum axis) {
|
2018-11-11 19:16:24 +01:00
|
|
|
if (ui.use_click()) return ui.goto_previous_screen_no_defer();
|
2020-07-03 16:53:22 +02:00
|
|
|
if (ui.encoderPosition && !ui.manual_move.processing) {
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
// Start with no limits to movement
|
|
|
|
float min = current_position[axis] - 1000,
|
|
|
|
max = current_position[axis] + 1000;
|
|
|
|
|
|
|
|
// Limit to software endstops, if enabled
|
2018-11-03 09:56:33 +01:00
|
|
|
#if HAS_SOFTWARE_ENDSTOPS
|
2018-10-27 23:45:37 +02:00
|
|
|
if (soft_endstops_enabled) switch (axis) {
|
|
|
|
case X_AXIS:
|
2020-04-22 23:35:03 +02:00
|
|
|
TERN_(MIN_SOFTWARE_ENDSTOP_X, min = soft_endstop.min.x);
|
|
|
|
TERN_(MAX_SOFTWARE_ENDSTOP_X, max = soft_endstop.max.x);
|
2018-10-27 23:45:37 +02:00
|
|
|
break;
|
|
|
|
case Y_AXIS:
|
2020-04-22 23:35:03 +02:00
|
|
|
TERN_(MIN_SOFTWARE_ENDSTOP_Y, min = soft_endstop.min.y);
|
|
|
|
TERN_(MAX_SOFTWARE_ENDSTOP_Y, max = soft_endstop.max.y);
|
2018-10-27 23:45:37 +02:00
|
|
|
break;
|
|
|
|
case Z_AXIS:
|
2020-04-22 23:35:03 +02:00
|
|
|
TERN_(MIN_SOFTWARE_ENDSTOP_Z, min = soft_endstop.min.z);
|
|
|
|
TERN_(MAX_SOFTWARE_ENDSTOP_Z, max = soft_endstop.max.z);
|
2018-10-27 23:45:37 +02:00
|
|
|
default: break;
|
|
|
|
}
|
2018-11-03 09:56:33 +01:00
|
|
|
#endif // HAS_SOFTWARE_ENDSTOPS
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
// Delta limits XY based on the current offset from center
|
|
|
|
// This assumes the center is 0,0
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
if (axis != Z_AXIS) {
|
|
|
|
max = SQRT(sq((float)(DELTA_PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis
|
|
|
|
min = -max;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Get the new position
|
2020-07-03 16:53:22 +02:00
|
|
|
const float diff = float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale;
|
2018-10-27 23:45:37 +02:00
|
|
|
#if IS_KINEMATIC
|
2020-07-03 16:53:22 +02:00
|
|
|
ui.manual_move.offset += diff;
|
2019-10-22 01:34:29 +02:00
|
|
|
if (int32_t(ui.encoderPosition) < 0)
|
2020-07-03 16:53:22 +02:00
|
|
|
NOLESS(ui.manual_move.offset, min - current_position[axis]);
|
2018-10-27 23:45:37 +02:00
|
|
|
else
|
2020-07-03 16:53:22 +02:00
|
|
|
NOMORE(ui.manual_move.offset, max - current_position[axis]);
|
2018-10-27 23:45:37 +02:00
|
|
|
#else
|
|
|
|
current_position[axis] += diff;
|
2019-10-22 01:34:29 +02:00
|
|
|
if (int32_t(ui.encoderPosition) < 0)
|
2018-10-27 23:45:37 +02:00
|
|
|
NOLESS(current_position[axis], min);
|
|
|
|
else
|
|
|
|
NOMORE(current_position[axis], max);
|
|
|
|
#endif
|
|
|
|
|
2020-07-03 16:53:22 +02:00
|
|
|
ui.manual_move.soon(axis);
|
2018-11-11 19:16:24 +01:00
|
|
|
ui.refresh(LCDVIEW_REDRAW_NOW);
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
2018-11-11 19:16:24 +01:00
|
|
|
ui.encoderPosition = 0;
|
|
|
|
if (ui.should_draw()) {
|
2020-06-25 23:39:22 +02:00
|
|
|
const float pos = NATIVE_TO_LOGICAL(
|
2020-07-03 16:53:22 +02:00
|
|
|
ui.manual_move.processing ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move.offset),
|
2020-06-25 23:39:22 +02:00
|
|
|
axis
|
|
|
|
);
|
2020-07-14 02:59:32 +02:00
|
|
|
MenuEditItemBase::draw_edit_screen(name, ui.manual_move.menu_scale >= 0.1f ? ftostr41sign(pos) : ftostr63(pos));
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
}
|
2019-10-10 02:46:10 +02:00
|
|
|
void lcd_move_x() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_X), X_AXIS); }
|
|
|
|
void lcd_move_y() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Y), Y_AXIS); }
|
|
|
|
void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
|
2019-09-10 09:20:49 +02:00
|
|
|
|
|
|
|
#if E_MANUAL
|
|
|
|
|
2020-04-26 00:53:06 +02:00
|
|
|
static void lcd_move_e(TERN_(MULTI_MANUAL, const int8_t eindex=-1)) {
|
2019-09-10 09:20:49 +02:00
|
|
|
if (ui.use_click()) return ui.goto_previous_screen_no_defer();
|
|
|
|
if (ui.encoderPosition) {
|
2020-07-03 16:53:22 +02:00
|
|
|
if (!ui.manual_move.processing) {
|
|
|
|
const float diff = float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale;
|
|
|
|
TERN(IS_KINEMATIC, ui.manual_move.offset, current_position.e) += diff;
|
|
|
|
ui.manual_move.soon(E_AXIS
|
2020-04-26 00:53:06 +02:00
|
|
|
#if MULTI_MANUAL
|
2019-09-10 09:20:49 +02:00
|
|
|
, eindex
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
ui.refresh(LCDVIEW_REDRAW_NOW);
|
|
|
|
}
|
|
|
|
ui.encoderPosition = 0;
|
|
|
|
}
|
|
|
|
if (ui.should_draw()) {
|
2020-07-15 04:26:09 +02:00
|
|
|
TERN_(MULTI_MANUAL, MenuItemBase::init(eindex));
|
2019-11-15 03:30:30 +01:00
|
|
|
MenuEditItemBase::draw_edit_screen(
|
2020-04-26 00:53:06 +02:00
|
|
|
GET_TEXT(TERN(MULTI_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)),
|
2019-11-15 03:30:30 +01:00
|
|
|
ftostr41sign(current_position.e
|
2020-07-03 16:53:22 +02:00
|
|
|
+ TERN0(IS_KINEMATIC, ui.manual_move.offset)
|
2020-04-26 00:53:06 +02:00
|
|
|
- TERN0(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin)
|
2019-11-15 03:30:30 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
} // should_draw
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
|
2019-09-10 09:20:49 +02:00
|
|
|
#endif // E_MANUAL
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// "Motion" > "Move Xmm" > "Move XYZ" submenu
|
|
|
|
//
|
|
|
|
|
2019-07-30 09:16:26 +02:00
|
|
|
#ifndef SHORT_MANUAL_Z_MOVE
|
|
|
|
#define SHORT_MANUAL_Z_MOVE 0.025
|
|
|
|
#endif
|
|
|
|
|
2018-10-27 23:45:37 +02:00
|
|
|
screenFunc_t _manual_move_func_ptr;
|
|
|
|
|
|
|
|
void _goto_manual_move(const float scale) {
|
2019-03-23 22:30:43 +01:00
|
|
|
ui.defer_status_screen();
|
2020-07-03 16:53:22 +02:00
|
|
|
ui.manual_move.menu_scale = scale;
|
2018-11-11 19:16:24 +01:00
|
|
|
ui.goto_screen(_manual_move_func_ptr);
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int8_t eindex=-1) {
|
|
|
|
_manual_move_func_ptr = func;
|
2020-04-28 06:52:11 +02:00
|
|
|
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
|
|
|
const bool too_cold = axis == E_AXIS && thermalManager.tooColdToExtrude(eindex >= 0 ? eindex : active_extruder);
|
|
|
|
#else
|
|
|
|
constexpr bool too_cold = false;
|
|
|
|
#endif
|
2018-10-27 23:45:37 +02:00
|
|
|
START_MENU();
|
|
|
|
if (LCD_HEIGHT >= 4) {
|
|
|
|
switch (axis) {
|
2019-09-27 10:06:23 +02:00
|
|
|
case X_AXIS: STATIC_ITEM(MSG_MOVE_X, SS_CENTER|SS_INVERT); break;
|
|
|
|
case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, SS_CENTER|SS_INVERT); break;
|
|
|
|
case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, SS_CENTER|SS_INVERT); break;
|
2018-10-27 23:45:37 +02:00
|
|
|
default:
|
2020-04-22 23:35:03 +02:00
|
|
|
TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e);
|
2019-09-27 10:06:23 +02:00
|
|
|
STATIC_ITEM(MSG_MOVE_E, SS_CENTER|SS_INVERT);
|
2018-10-27 23:45:37 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2020-04-28 06:52:11 +02:00
|
|
|
if (too_cold)
|
|
|
|
BACK_ITEM(MSG_HOTEND_TOO_COLD);
|
|
|
|
else {
|
2019-10-03 12:38:30 +02:00
|
|
|
BACK_ITEM(MSG_MOVE_AXIS);
|
2019-11-02 06:05:05 +01:00
|
|
|
SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10); });
|
|
|
|
SUBMENU(MSG_MOVE_1MM, []{ _goto_manual_move( 1); });
|
|
|
|
SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
|
2020-04-29 21:52:42 +02:00
|
|
|
if (axis == Z_AXIS && (SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
|
2019-11-02 13:09:57 +01:00
|
|
|
extern const char NUL_STR[];
|
|
|
|
SUBMENU_P(NUL_STR, []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
|
2020-04-28 06:52:11 +02:00
|
|
|
MENU_ITEM_ADDON_START(0 + ENABLED(HAS_CHARACTER_LCD));
|
2019-07-30 09:16:26 +02:00
|
|
|
char tmp[20], numstr[10];
|
|
|
|
// Determine digits needed right of decimal
|
|
|
|
const uint8_t digs = !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 1000 - int((SHORT_MANUAL_Z_MOVE) * 1000)) ? 4 :
|
|
|
|
!UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 100 - int((SHORT_MANUAL_Z_MOVE) * 100)) ? 3 : 2;
|
2019-10-10 02:46:10 +02:00
|
|
|
sprintf_P(tmp, GET_TEXT(MSG_MOVE_Z_DIST), dtostrf(SHORT_MANUAL_Z_MOVE, 1, digs, numstr));
|
2019-10-10 03:41:44 +02:00
|
|
|
lcd_put_u8str(tmp);
|
2019-07-30 09:16:26 +02:00
|
|
|
MENU_ITEM_ADDON_END();
|
|
|
|
}
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
|
|
|
|
void menu_move() {
|
|
|
|
START_MENU();
|
2019-10-03 12:38:30 +02:00
|
|
|
BACK_ITEM(MSG_MOTION);
|
2018-10-27 23:45:37 +02:00
|
|
|
|
2020-04-24 04:42:38 +02:00
|
|
|
#if BOTH(HAS_SOFTWARE_ENDSTOPS, SOFT_ENDSTOPS_MENU_ITEM)
|
2019-10-03 12:38:30 +02:00
|
|
|
EDIT_ITEM(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled);
|
2018-10-27 23:45:37 +02:00
|
|
|
#endif
|
|
|
|
|
2020-04-26 00:53:06 +02:00
|
|
|
if (NONE(IS_KINEMATIC, NO_MOTION_BEFORE_HOMING) || all_axes_homed()) {
|
2020-04-22 23:35:03 +02:00
|
|
|
if (TERN1(DELTA, current_position.z <= delta_clip_start_height)) {
|
2019-11-02 06:05:05 +01:00
|
|
|
SUBMENU(MSG_MOVE_X, []{ _menu_move_distance(X_AXIS, lcd_move_x); });
|
|
|
|
SUBMENU(MSG_MOVE_Y, []{ _menu_move_distance(Y_AXIS, lcd_move_y); });
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
else
|
2019-11-02 06:05:05 +01:00
|
|
|
ACTION_ITEM(MSG_FREE_XY, []{ line_to_z(delta_clip_start_height); ui.synchronize(); });
|
2018-10-27 23:45:37 +02:00
|
|
|
#endif
|
|
|
|
|
2019-11-02 06:05:05 +01:00
|
|
|
SUBMENU(MSG_MOVE_Z, []{ _menu_move_distance(Z_AXIS, lcd_move_z); });
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
else
|
2019-11-02 05:51:25 +01:00
|
|
|
GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
|
2018-10-27 23:45:37 +02:00
|
|
|
|
2019-04-11 20:29:17 +02:00
|
|
|
#if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, MAGNETIC_SWITCHING_TOOLHEAD)
|
2018-10-27 23:45:37 +02:00
|
|
|
|
2019-10-08 02:44:33 +02:00
|
|
|
#if EXTRUDERS >= 4
|
2018-10-27 23:45:37 +02:00
|
|
|
switch (active_extruder) {
|
2019-11-15 03:30:30 +01:00
|
|
|
case 0: GCODES_ITEM_N(1, MSG_SELECT_E, PSTR("T1")); break;
|
|
|
|
case 1: GCODES_ITEM_N(0, MSG_SELECT_E, PSTR("T0")); break;
|
|
|
|
case 2: GCODES_ITEM_N(3, MSG_SELECT_E, PSTR("T3")); break;
|
|
|
|
case 3: GCODES_ITEM_N(2, MSG_SELECT_E, PSTR("T2")); break;
|
2019-10-08 02:44:33 +02:00
|
|
|
#if EXTRUDERS == 6
|
2019-11-15 03:30:30 +01:00
|
|
|
case 4: GCODES_ITEM_N(5, MSG_SELECT_E, PSTR("T5")); break;
|
|
|
|
case 5: GCODES_ITEM_N(4, MSG_SELECT_E, PSTR("T4")); break;
|
2019-10-08 02:44:33 +02:00
|
|
|
#endif
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
#elif EXTRUDERS == 3
|
|
|
|
if (active_extruder < 2) {
|
2020-04-29 21:52:42 +02:00
|
|
|
if (active_extruder)
|
2019-11-15 03:30:30 +01:00
|
|
|
GCODES_ITEM_N(0, MSG_SELECT_E, PSTR("T0"));
|
2020-04-29 21:52:42 +02:00
|
|
|
else
|
2019-11-15 03:30:30 +01:00
|
|
|
GCODES_ITEM_N(1, MSG_SELECT_E, PSTR("T1"));
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
|
|
|
#else
|
2020-04-29 21:52:42 +02:00
|
|
|
if (active_extruder)
|
2019-11-15 03:30:30 +01:00
|
|
|
GCODES_ITEM_N(0, MSG_SELECT_E, PSTR("T0"));
|
2020-04-29 21:52:42 +02:00
|
|
|
else
|
2019-11-15 03:30:30 +01:00
|
|
|
GCODES_ITEM_N(1, MSG_SELECT_E, PSTR("T1"));
|
2018-10-27 23:45:37 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#elif ENABLED(DUAL_X_CARRIAGE)
|
|
|
|
|
2020-04-29 21:52:42 +02:00
|
|
|
if (active_extruder)
|
2019-11-15 03:30:30 +01:00
|
|
|
GCODES_ITEM_N(0, MSG_SELECT_E, PSTR("T0"));
|
2020-04-29 21:52:42 +02:00
|
|
|
else
|
2019-11-15 03:30:30 +01:00
|
|
|
GCODES_ITEM_N(1, MSG_SELECT_E, PSTR("T1"));
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2019-09-10 09:20:49 +02:00
|
|
|
#if E_MANUAL
|
2018-10-27 23:45:37 +02:00
|
|
|
|
2019-10-08 02:44:33 +02:00
|
|
|
// The current extruder
|
2019-11-02 06:05:05 +01:00
|
|
|
SUBMENU(MSG_MOVE_E, []{ _menu_move_distance(E_AXIS, []{ lcd_move_e(); }, -1); });
|
2019-10-08 02:44:33 +02:00
|
|
|
|
2019-11-15 03:30:30 +01:00
|
|
|
#define SUBMENU_MOVE_E(N) SUBMENU_N(N, MSG_MOVE_EN, []{ _menu_move_distance(E_AXIS, []{ lcd_move_e(MenuItemBase::itemIndex); }, MenuItemBase::itemIndex); });
|
2019-10-08 02:44:33 +02:00
|
|
|
|
2019-09-10 09:20:49 +02:00
|
|
|
#if EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE)
|
2018-10-27 23:45:37 +02:00
|
|
|
|
2019-09-10 09:20:49 +02:00
|
|
|
// ...and the non-switching
|
2020-04-28 06:52:11 +02:00
|
|
|
#if E_MANUAL == 7 || E_MANUAL == 5 || E_MANUAL == 3
|
|
|
|
SUBMENU_MOVE_E(E_MANUAL - 1);
|
2019-09-10 09:20:49 +02:00
|
|
|
#endif
|
2018-10-27 23:45:37 +02:00
|
|
|
|
2020-04-26 00:53:06 +02:00
|
|
|
#elif MULTI_MANUAL
|
2019-09-10 09:20:49 +02:00
|
|
|
|
|
|
|
// Independent extruders with one E-stepper per hotend
|
2020-03-14 05:18:16 +01:00
|
|
|
LOOP_L_N(n, E_MANUAL) SUBMENU_MOVE_E(n);
|
2019-09-10 09:20:49 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // E_MANUAL
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
|
2019-07-20 08:41:34 +02:00
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
|
|
void _lcd_ubl_level_bed();
|
|
|
|
#elif ENABLED(LCD_BED_LEVELING)
|
|
|
|
void menu_bed_leveling();
|
|
|
|
#endif
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
void menu_motion() {
|
|
|
|
START_MENU();
|
|
|
|
|
|
|
|
//
|
|
|
|
// ^ Main
|
|
|
|
//
|
2019-10-03 12:38:30 +02:00
|
|
|
BACK_ITEM(MSG_MAIN);
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Move Axis
|
|
|
|
//
|
2020-04-29 21:52:42 +02:00
|
|
|
if (TERN1(DELTA, all_axes_homed()))
|
2020-04-28 06:52:11 +02:00
|
|
|
SUBMENU(MSG_MOVE_AXIS, menu_move);
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Auto Home
|
|
|
|
//
|
2019-11-02 05:51:25 +01:00
|
|
|
GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
|
2018-10-27 23:45:37 +02:00
|
|
|
#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU)
|
2020-03-11 02:00:26 +01:00
|
|
|
GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X"));
|
|
|
|
GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y"));
|
|
|
|
GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z"));
|
2018-10-27 23:45:37 +02:00
|
|
|
#endif
|
|
|
|
|
2020-07-25 06:31:15 +02:00
|
|
|
//
|
|
|
|
// Auto-calibration
|
|
|
|
//
|
|
|
|
#if ENABLED(CALIBRATION_GCODE)
|
|
|
|
GCODES_ITEM(MSG_AUTO_CALIBRATE, PSTR("G425"));
|
|
|
|
#endif
|
|
|
|
|
2018-10-29 20:01:36 +01:00
|
|
|
//
|
|
|
|
// Auto Z-Align
|
|
|
|
//
|
|
|
|
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
2019-10-03 12:38:30 +02:00
|
|
|
GCODES_ITEM(MSG_AUTO_Z_ALIGN, PSTR("G34"));
|
2018-10-29 20:01:36 +01:00
|
|
|
#endif
|
|
|
|
|
2020-07-25 06:31:15 +02:00
|
|
|
//
|
|
|
|
// Assisted Bed Tramming
|
|
|
|
//
|
|
|
|
#if ENABLED(ASSISTED_TRAMMING)
|
|
|
|
GCODES_ITEM(MSG_ASSISTED_TRAMMING, PSTR("G35"));
|
|
|
|
#endif
|
|
|
|
|
2018-10-27 23:45:37 +02:00
|
|
|
//
|
|
|
|
// Level Bed
|
|
|
|
//
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
|
|
|
2019-10-03 12:38:30 +02:00
|
|
|
SUBMENU(MSG_UBL_LEVEL_BED, _lcd_ubl_level_bed);
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
#elif ENABLED(LCD_BED_LEVELING)
|
|
|
|
|
2020-04-29 21:52:42 +02:00
|
|
|
if (!g29_in_progress)
|
2020-04-28 06:52:11 +02:00
|
|
|
SUBMENU(MSG_BED_LEVELING, menu_bed_leveling);
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
#elif HAS_LEVELING && DISABLED(SLIM_LCD_MENUS)
|
|
|
|
|
|
|
|
#if DISABLED(PROBE_MANUALLY)
|
2019-10-03 12:38:30 +02:00
|
|
|
GCODES_ITEM(MSG_LEVEL_BED, PSTR("G28\nG29"));
|
2018-10-27 23:45:37 +02:00
|
|
|
#endif
|
2020-04-28 06:52:11 +02:00
|
|
|
|
2020-04-29 21:52:42 +02:00
|
|
|
if (all_axes_homed() && leveling_is_valid()) {
|
2019-10-08 02:44:33 +02:00
|
|
|
bool show_state = planner.leveling_active;
|
|
|
|
EDIT_ITEM(bool, MSG_BED_LEVELING, &show_state, _lcd_toggle_bed_leveling);
|
2018-10-27 23:45:37 +02:00
|
|
|
}
|
2020-04-28 06:52:11 +02:00
|
|
|
|
2018-10-27 23:45:37 +02:00
|
|
|
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
2020-04-29 21:52:42 +02:00
|
|
|
editable.decimal = planner.z_fade_height;
|
|
|
|
EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &editable.decimal, 0, 100, []{ set_z_fade_height(editable.decimal); });
|
2018-10-27 23:45:37 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ENABLED(LEVEL_BED_CORNERS) && DISABLED(LCD_BED_LEVELING)
|
2019-10-03 12:38:30 +02:00
|
|
|
ACTION_ITEM(MSG_LEVEL_CORNERS, _lcd_level_bed_corners);
|
2018-10-27 23:45:37 +02:00
|
|
|
#endif
|
|
|
|
|
2019-07-30 09:31:14 +02:00
|
|
|
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
2019-10-03 12:38:30 +02:00
|
|
|
GCODES_ITEM(MSG_M48_TEST, PSTR("G28\nM48 P10"));
|
2019-07-30 09:31:14 +02:00
|
|
|
#endif
|
|
|
|
|
2018-10-27 23:45:37 +02:00
|
|
|
//
|
|
|
|
// Disable Steppers
|
|
|
|
//
|
2019-10-03 12:38:30 +02:00
|
|
|
GCODES_ITEM(MSG_DISABLE_STEPPERS, PSTR("M84"));
|
2018-10-27 23:45:37 +02:00
|
|
|
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // HAS_LCD_MENU
|