浏览代码

Touch UI: Fix UBL mesh value editing (#16432)

Tanguy Pruvot 5 年前
父节点
当前提交
cda363a15e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      Marlin/src/lcd/ultralcd.cpp

+ 4
- 1
Marlin/src/lcd/ultralcd.cpp 查看文件

784
           if (ELAPSED(ms, next_button_update_ms)) {
784
           if (ELAPSED(ms, next_button_update_ms)) {
785
             encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * (ENCODER_PULSES_PER_STEP) * encoderDirection;
785
             encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * (ENCODER_PULSES_PER_STEP) * encoderDirection;
786
             if (buttons & EN_A) encoderDiff *= -1;
786
             if (buttons & EN_A) encoderDiff *= -1;
787
+            #if ENABLED(AUTO_BED_LEVELING_UBL)
788
+              if (external_control) ubl.encoder_diff = encoderDiff;
789
+            #endif
787
             next_button_update_ms = ms + repeat_delay;    // Assume the repeat delay
790
             next_button_update_ms = ms + repeat_delay;    // Assume the repeat delay
788
             if (!wait_for_unclick) {
791
             if (!wait_for_unclick) {
789
               next_button_update_ms += 250;               // Longer delay on first press
792
               next_button_update_ms += 250;               // Longer delay on first press
1274
 
1277
 
1275
     } // next_button_update_ms
1278
     } // next_button_update_ms
1276
 
1279
 
1277
-    #if HAS_ENCODER_WHEEL
1280
+    #if HAS_ENCODER_WHEEL && DISABLED(TOUCH_BUTTONS)
1278
       static uint8_t lastEncoderBits;
1281
       static uint8_t lastEncoderBits;
1279
 
1282
 
1280
       #define encrot0 0
1283
       #define encrot0 0

正在加载...
取消
保存