Browse Source

Fix ExtUI compile (#17834)

mojocorp 4 years ago
parent
commit
93946c2868
No account linked to committer's email address
2 changed files with 13 additions and 8 deletions
  1. 8
    6
      Marlin/src/lcd/extui_example.cpp
  2. 5
    2
      Marlin/src/lcd/extui_malyan_lcd.cpp

+ 8
- 6
Marlin/src/lcd/extui_example.cpp View File

@@ -89,13 +89,15 @@ namespace ExtUI {
89 89
     // whether successful or not.
90 90
   }
91 91
 
92
-  void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
93
-    // Called when any mesh points are updated
94
-  }
92
+  #if HAS_MESH
93
+    void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
94
+      // Called when any mesh points are updated
95
+    }
95 96
 
96
-  void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {
97
-    // Called to indicate a special condition
98
-  }
97
+    void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {
98
+      // Called to indicate a special condition
99
+    }
100
+  #endif
99 101
 
100 102
   #if ENABLED(POWER_LOSS_RECOVERY)
101 103
     void onPowerLossResume() {

+ 5
- 2
Marlin/src/lcd/extui_malyan_lcd.cpp View File

@@ -491,8 +491,11 @@ namespace ExtUI {
491 491
   void onLoadSettings(const char*) {}
492 492
   void onConfigurationStoreWritten(bool) {}
493 493
   void onConfigurationStoreRead(bool) {}
494
-  void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {}
495
-  void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {}
494
+
495
+  #if HAS_MESH
496
+    void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {}
497
+    void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {}
498
+  #endif
496 499
 
497 500
   #if ENABLED(POWER_LOSS_RECOVERY)
498 501
     void onPowerLossResume() {}

Loading…
Cancel
Save