소스 검색

Fix LCD manual movement on kinematic machines (#9655)

Thomas Moore 7 년 전
부모
커밋
cff62042ee
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6
    3
      Marlin/src/lcd/ultralcd.cpp

+ 6
- 3
Marlin/src/lcd/ultralcd.cpp 파일 보기

@@ -2818,7 +2818,10 @@ void kill_screen(const char* lcd_msg) {
2818 2818
         manual_move_offset = 0.0;
2819 2819
         manual_move_axis = (int8_t)NO_AXIS;
2820 2820
 
2821
-        // Set a blocking flag so no new moves can be added until all segments are done
2821
+        // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to
2822
+        // move_to_destination. This will cause idle() to be called, which can then call this function while the
2823
+        // previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
2824
+        // processing_manual_move is true or the planner will get out of sync.
2822 2825
         processing_manual_move = true;
2823 2826
         prepare_move_to_destination(); // will call set_current_from_destination()
2824 2827
         processing_manual_move = false;
@@ -2930,11 +2933,11 @@ void kill_screen(const char* lcd_msg) {
2930 2933
     }
2931 2934
     encoderPosition = 0;
2932 2935
     if (lcdDrawUpdate) {
2933
-      const float pos = current_position[axis]
2936
+      const float pos = (processing_manual_move ? destination[axis] : current_position[axis]
2934 2937
         #if IS_KINEMATIC
2935 2938
           + manual_move_offset
2936 2939
         #endif
2937
-      ;
2940
+      );
2938 2941
       lcd_implementation_drawedit(name, move_menu_scale >= 0.1 ? ftostr41sign(pos) : ftostr43sign(pos));
2939 2942
     }
2940 2943
   }

Loading…
취소
저장