Procházet zdrojové kódy

Fix ExtUI onMeshUpdate event (#15477)

InsanityAutomation před 5 roky
rodič
revize
71526fa5ce

+ 0
- 3
Marlin/src/lcd/extensible_ui/ui_api.cpp Zobrazit soubor

819
           #endif
819
           #endif
820
         }
820
         }
821
       }
821
       }
822
-      void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval) {
823
-        UNUSED(xpos); UNUSED(ypos); UNUSED(zval);
824
-      }
825
     #endif
822
     #endif
826
   #endif
823
   #endif
827
 
824
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/ui_api.h Zobrazit soubor

138
       float getMeshPoint(const xy_uint8_t &pos);
138
       float getMeshPoint(const xy_uint8_t &pos);
139
       void setMeshPoint(const xy_uint8_t &pos, const float zval);
139
       void setMeshPoint(const xy_uint8_t &pos, const float zval);
140
       void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval);
140
       void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval);
141
-      inline void onMeshUpdate(const xy_uint8_t &pos, const float zval) { setMeshPoint(pos, zval); }
141
+      inline void onMeshUpdate(const xy_uint8_t &pos, const float zval) { onMeshUpdate(pos.x, pos.y, zval); }
142
     #endif
142
     #endif
143
   #endif
143
   #endif
144
 
144
 

+ 4
- 0
Marlin/src/lcd/extui_example.cpp Zobrazit soubor

88
     // This is called after the entire EEPROM has been read,
88
     // This is called after the entire EEPROM has been read,
89
     // whether successful or not.
89
     // whether successful or not.
90
   }
90
   }
91
+
92
+  void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval) {
93
+    // This is called when any mesh points are updated
94
+  }
91
 }
95
 }
92
 
96
 
93
 #endif // EXTUI_EXAMPLE && EXTENSIBLE_UI
97
 #endif // EXTUI_EXAMPLE && EXTENSIBLE_UI

Loading…
Zrušit
Uložit