Clean up, optimize ExtUI/TFT code (#21333)
This commit is contained in:
@@ -61,7 +61,7 @@ namespace ExtUI {
|
||||
void onUserConfirmRequired(const char * const msg) {
|
||||
if (msg) {
|
||||
ScreenHandler.sendinfoscreen(PSTR("Please confirm."), nullptr, msg, nullptr, true, true, false, true);
|
||||
ScreenHandler.SetupConfirmAction(ExtUI::setUserConfirmed);
|
||||
ScreenHandler.SetupConfirmAction(setUserConfirmed);
|
||||
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POPUP);
|
||||
}
|
||||
else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP ) {
|
||||
@@ -84,7 +84,7 @@ namespace ExtUI {
|
||||
// into buff.
|
||||
|
||||
// Example:
|
||||
// static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size);
|
||||
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
|
||||
// memcpy(buff, &myDataStruct, sizeof(myDataStruct));
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace ExtUI {
|
||||
// from buff
|
||||
|
||||
// Example:
|
||||
// static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size);
|
||||
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
|
||||
// memcpy(&myDataStruct, buff, sizeof(myDataStruct));
|
||||
}
|
||||
|
||||
@@ -111,11 +111,11 @@ namespace ExtUI {
|
||||
#if HAS_MESH
|
||||
void onMeshLevelingStart() {}
|
||||
|
||||
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
|
||||
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float &zval) {
|
||||
// Called when any mesh points are updated
|
||||
}
|
||||
|
||||
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {
|
||||
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) {
|
||||
// Called to indicate a special condition
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user