Browse Source

Fix ui.external_control compile error (#18778)

Victor Oliveira 5 years ago
parent
commit
6f26ed23ee
No account linked to committer's email address
1 changed files with 13 additions and 11 deletions
  1. 13
    11
      Marlin/src/lcd/ultralcd.cpp

+ 13
- 11
Marlin/src/lcd/ultralcd.cpp View File

753
     //SERIAL_ECHOLNPAIR("Post Move with Axis ", int(axis), " soon.");
753
     //SERIAL_ECHOLNPAIR("Post Move with Axis ", int(axis), " soon.");
754
   }
754
   }
755
 
755
 
756
-#endif // HAS_LCD_MENU
757
-
758
-#if ENABLED(AUTO_BED_LEVELING_UBL)
756
+  #if ENABLED(AUTO_BED_LEVELING_UBL)
759
 
757
 
760
-  void MarlinUI::external_encoder() {
761
-    if (external_control && encoderDiff) {
762
-      ubl.encoder_diff += encoderDiff;  // Encoder for UBL G29 mesh editing
763
-      encoderDiff = 0;                  // Hide encoder events from the screen handler
764
-      refresh(LCDVIEW_REDRAW_NOW);      // ...but keep the refresh.
758
+    void MarlinUI::external_encoder() {
759
+      if (external_control && encoderDiff) {
760
+        ubl.encoder_diff += encoderDiff;  // Encoder for UBL G29 mesh editing
761
+        encoderDiff = 0;                  // Hide encoder events from the screen handler
762
+        refresh(LCDVIEW_REDRAW_NOW);      // ...but keep the refresh.
763
+      }
765
     }
764
     }
766
-  }
767
 
765
 
768
-#endif
766
+  #endif
767
+
768
+#endif // HAS_LCD_MENU
769
 
769
 
770
 /**
770
 /**
771
  * Update the LCD, read encoder buttons, etc.
771
  * Update the LCD, read encoder buttons, etc.
1283
           case encrot2: ENCODER_SPIN(encrot1, encrot3); break;
1283
           case encrot2: ENCODER_SPIN(encrot1, encrot3); break;
1284
           case encrot3: ENCODER_SPIN(encrot2, encrot0); break;
1284
           case encrot3: ENCODER_SPIN(encrot2, encrot0); break;
1285
         }
1285
         }
1286
-        TERN_(AUTO_BED_LEVELING_UBL, external_encoder());
1286
+        #if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL)
1287
+          external_encoder();
1288
+        #endif
1287
         lastEncoderBits = enc;
1289
         lastEncoderBits = enc;
1288
       }
1290
       }
1289
 
1291
 

Loading…
Cancel
Save