🐛 Fix Manual Move axis selection (#24404)

This commit is contained in:
Scott Lahteine
2022-06-26 05:47:18 -05:00
parent b46191715d
commit d8545551fe
9 changed files with 46 additions and 62 deletions

View File

@@ -763,6 +763,7 @@ void MarlinUI::init() {
millis_t ManualMove::start_time = 0;
float ManualMove::menu_scale = 1;
screenFunc_t ManualMove::screen_ptr;
#if IS_KINEMATIC
float ManualMove::offset = 0;
xyze_pos_t ManualMove::all_axes_destination = { 0 };
@@ -772,6 +773,9 @@ void MarlinUI::init() {
int8_t ManualMove::e_index = 0;
#endif
AxisEnum ManualMove::axis = NO_AXIS_ENUM;
#if ENABLED(MANUAL_E_MOVES_RELATIVE)
float ManualMove::e_origin = 0;
#endif
/**
* If a manual move has been posted and its time has arrived, and if the planner
@@ -788,9 +792,6 @@ void MarlinUI::init() {
* For kinematic machines:
* - Set manual_move.offset to modify one axis and post the move.
* This is used to achieve more rapid stepping on kinematic machines.
*
* Currently used by the _lcd_move_xyz function in menu_motion.cpp
* and the ubl_map_move_to_xy function in menu_ubl.cpp.
*/
void ManualMove::task() {
@@ -861,7 +862,7 @@ void MarlinUI::init() {
void MarlinUI::external_encoder() {
if (external_control && encoderDiff) {
bedlevel.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing
bedlevel.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing
encoderDiff = 0; // Hide encoder events from the screen handler
refresh(LCDVIEW_REDRAW_NOW); // ...but keep the refresh.
}