Browse Source

Fix MKS UI manual move (#20813)

vanilla_fb_2.0.x
Rockman18 4 years ago
committed by Scott Lahteine
parent
commit
1fdf283e5d
  1. 8
      Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp

8
Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp

@ -54,14 +54,18 @@ enum {
static void event_handler(lv_obj_t *obj, lv_event_t event) {
if (event != LV_EVENT_RELEASED) return;
if (queue.length <= (BUFSIZE - 3)) {
bool do_inject = true;
float dist = uiCfg.move_dist;
switch (obj->mks_obj_id) {
case ID_M_X_N: dist *= -1; case ID_M_X_P: cur_label = 'X'; break;
case ID_M_Y_N: dist *= -1; case ID_M_Y_P: cur_label = 'Y'; break;
case ID_M_Z_N: dist *= -1; case ID_M_Z_P: cur_label = 'Z'; break;
default: do_inject = false;
}
if (do_inject) {
sprintf_P(public_buf_l, PSTR("G91\nG1 %c%3.1f F%d\nG90"), cur_label, dist, uiCfg.moveSpeed);
queue.inject(public_buf_l);
}
sprintf_P(public_buf_l, PSTR("G91\nG1 %c%3.1f F%d\nG90"), cur_label, dist, uiCfg.moveSpeed);
queue.inject(public_buf_l);
}
switch (obj->mks_obj_id) {

Loading…
Cancel
Save