🧑‍💻 Add ExtUI::onLevelingDone, match DWIN to ExtUI

This commit is contained in:
Scott Lahteine 2022-03-12 15:58:28 -06:00 committed by Scott Lahteine
parent 16271377e2
commit 4817efcf81
19 changed files with 94 additions and 71 deletions

View File

@ -1219,6 +1219,7 @@ void unified_bed_leveling::restore_ubl_active_state_and_leave() {
} }
#endif #endif
set_bed_leveling_enabled(ubl_state_at_invocation); set_bed_leveling_enabled(ubl_state_at_invocation);
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
} }
mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() { mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() {

View File

@ -419,12 +419,13 @@ G29_TYPE GcodeSuite::G29() {
planner.synchronize(); planner.synchronize();
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
#if ENABLED(AUTO_BED_LEVELING_3POINT) #if ENABLED(AUTO_BED_LEVELING_3POINT)
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart()); TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_LevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart());
#endif #endif
if (!faux) { if (!faux) {
@ -577,6 +578,7 @@ G29_TYPE GcodeSuite::G29() {
SERIAL_ECHOLNPGM("Grid probing done."); SERIAL_ECHOLNPGM("Grid probing done.");
// Re-enable software endstops, if needed // Re-enable software endstops, if needed
SET_SOFT_ENDSTOP_LOOSE(false); SET_SOFT_ENDSTOP_LOOSE(false);
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
} }
#elif ENABLED(AUTO_BED_LEVELING_3POINT) #elif ENABLED(AUTO_BED_LEVELING_3POINT)
@ -606,6 +608,8 @@ G29_TYPE GcodeSuite::G29() {
abl.reenable = false; abl.reenable = false;
} }
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
} }
#endif // AUTO_BED_LEVELING_3POINT #endif // AUTO_BED_LEVELING_3POINT
@ -899,7 +903,7 @@ G29_TYPE GcodeSuite::G29() {
process_subcommands_now(F(Z_PROBE_END_SCRIPT)); process_subcommands_now(F(Z_PROBE_END_SCRIPT));
#endif #endif
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedLeveling()); TERN_(HAS_DWIN_E3V2_BASIC, DWIN_LevelingDone());
TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index)); TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index));

View File

@ -104,8 +104,8 @@ void GcodeSuite::G29() {
mbl_probe_index = 0; mbl_probe_index = 0;
if (!ui.wait_for_move) { if (!ui.wait_for_move) {
queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2")); queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2"));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart()); TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart()); TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
return; return;
} }
state = MeshNext; state = MeshNext;
@ -168,6 +168,7 @@ void GcodeSuite::G29() {
#endif #endif
TERN_(LCD_BED_LEVELING, ui.wait_for_move = false); TERN_(LCD_BED_LEVELING, ui.wait_for_move = false);
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
} }
break; break;

View File

@ -239,7 +239,7 @@ void GcodeSuite::G28() {
set_and_report_grblstate(M_HOMING); set_and_report_grblstate(M_HOMING);
#endif #endif
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StartHoming()); TERN_(HAS_DWIN_E3V2_BASIC, DWIN_HomingStart());
TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
planner.synchronize(); // Wait for planner moves to finish! planner.synchronize(); // Wait for planner moves to finish!
@ -552,8 +552,8 @@ void GcodeSuite::G28() {
ui.refresh(); ui.refresh();
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedHoming()); TERN_(HAS_DWIN_E3V2_BASIC, DWIN_HomingDone());
TERN_(EXTENSIBLE_UI, ExtUI::onHomingComplete()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingDone());
report_current_position(); report_current_position();

View File

@ -108,7 +108,7 @@ void GcodeSuite::M1001() {
process_subcommands_now(F(SD_FINISHED_RELEASECOMMAND)); process_subcommands_now(F(SD_FINISHED_RELEASECOMMAND));
#endif #endif
TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished()); TERN_(EXTENSIBLE_UI, ExtUI::onPrintDone());
TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished()); TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());
// Re-select the last printed file in the UI // Re-select the last printed file in the UI

View File

@ -4281,7 +4281,7 @@ void DWIN_HandleScreen() {
} }
} }
void DWIN_CompletedHoming() { void DWIN_HomingDone() {
HMI_flag.home_flag = false; HMI_flag.home_flag = false;
dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
if (checkkey == Last_Prepare) { if (checkkey == Last_Prepare) {
@ -4297,7 +4297,7 @@ void DWIN_CompletedHoming() {
} }
} }
void DWIN_CompletedLeveling() { void DWIN_LevelingDone() {
if (checkkey == Leveling) Goto_MainMenu(); if (checkkey == Leveling) Goto_MainMenu();
} }

View File

@ -243,7 +243,7 @@ void DWIN_HandleScreen();
void DWIN_StatusChanged(const char * const cstr=nullptr); void DWIN_StatusChanged(const char * const cstr=nullptr);
void DWIN_StatusChanged(FSTR_P const fstr); void DWIN_StatusChanged(FSTR_P const fstr);
inline void DWIN_StartHoming() { HMI_flag.home_flag = true; } inline void DWIN_HomingStart() { HMI_flag.home_flag = true; }
void DWIN_CompletedHoming(); void DWIN_HomingDone();
void DWIN_CompletedLeveling(); void DWIN_LevelingDone();

View File

@ -1542,20 +1542,20 @@ void HMI_SaveProcessID(const uint8_t id) {
} }
} }
void DWIN_StartHoming() { void DWIN_HomingStart() {
HMI_flag.home_flag = true; HMI_flag.home_flag = true;
HMI_SaveProcessID(Homing); HMI_SaveProcessID(Homing);
Title.ShowCaption(GET_TEXT_F(MSG_HOMING)); Title.ShowCaption(GET_TEXT_F(MSG_HOMING));
DWIN_Show_Popup(ICON_BLTouch, GET_TEXT_F(MSG_HOMING), GET_TEXT_F(MSG_PLEASE_WAIT)); DWIN_Show_Popup(ICON_BLTouch, GET_TEXT_F(MSG_HOMING), GET_TEXT_F(MSG_PLEASE_WAIT));
} }
void DWIN_CompletedHoming() { void DWIN_HomingDone() {
HMI_flag.home_flag = false; HMI_flag.home_flag = false;
dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
if (HMI_flag.abort_action) DWIN_Print_Aborted(); else HMI_ReturnScreen(); if (HMI_flag.abort_action) DWIN_Print_Aborted(); else HMI_ReturnScreen();
} }
void DWIN_MeshLevelingStart() { void DWIN_LevelingStart() {
#if HAS_ONESTEP_LEVELING #if HAS_ONESTEP_LEVELING
HMI_SaveProcessID(Leveling); HMI_SaveProcessID(Leveling);
Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING)); Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING));
@ -1565,7 +1565,7 @@ void DWIN_MeshLevelingStart() {
#endif #endif
} }
void DWIN_CompletedLeveling() { void DWIN_LevelingDone() {
TERN_(HAS_ONESTEP_LEVELING, if (planner.leveling_active) Goto_MeshViewer()); TERN_(HAS_ONESTEP_LEVELING, if (planner.leveling_active) Goto_MeshViewer());
} }

View File

@ -142,13 +142,13 @@ void update_variable();
void DWIN_InitScreen(); void DWIN_InitScreen();
void DWIN_HandleScreen(); void DWIN_HandleScreen();
void DWIN_CheckStatusMessage(); void DWIN_CheckStatusMessage();
void DWIN_StartHoming(); void DWIN_HomingStart();
void DWIN_CompletedHoming(); void DWIN_HomingDone();
#if HAS_MESH #if HAS_MESH
void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval); void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval);
#endif #endif
void DWIN_MeshLevelingStart(); void DWIN_LevelingStart();
void DWIN_CompletedLeveling(); void DWIN_LevelingDone();
void DWIN_PidTuning(pidresult_t result); void DWIN_PidTuning(pidresult_t result);
void DWIN_Print_Started(const bool sd=false); void DWIN_Print_Started(const bool sd=false);
void DWIN_Print_Pause(); void DWIN_Print_Pause();

View File

@ -57,14 +57,16 @@ namespace ExtUI {
void onPrintTimerStarted() { Chiron.TimerEvent(AC_timer_started); } void onPrintTimerStarted() { Chiron.TimerEvent(AC_timer_started); }
void onPrintTimerPaused() { Chiron.TimerEvent(AC_timer_paused); } void onPrintTimerPaused() { Chiron.TimerEvent(AC_timer_paused); }
void onPrintTimerStopped() { Chiron.TimerEvent(AC_timer_stopped); } void onPrintTimerStopped() { Chiron.TimerEvent(AC_timer_stopped); }
void onPrintDone() {}
void onFilamentRunout(const extruder_t) { Chiron.FilamentRunout(); } void onFilamentRunout(const extruder_t) { Chiron.FilamentRunout(); }
void onUserConfirmRequired(const char * const msg) { Chiron.ConfirmationRequest(msg); } void onUserConfirmRequired(const char * const msg) { Chiron.ConfirmationRequest(msg); }
void onStatusChanged(const char * const msg) { Chiron.StatusChange(msg); } void onStatusChanged(const char * const msg) { Chiron.StatusChange(msg); }
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onPrintFinished() {}
void onFactoryReset() {} void onFactoryReset() {}
@ -103,7 +105,8 @@ namespace ExtUI {
} }
#if HAS_MESH #if HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated // Called when any mesh points are updated

View File

@ -86,13 +86,23 @@ void ChironTFT::Startup() {
TFTSer.begin(115200); TFTSer.begin(115200);
// wait for the TFT panel to initialise and finish the animation // wait for the TFT panel to initialise and finish the animation
delay_ms(250); safe_delay(1000);
// There are different panels for the Chiron with slightly different commands // There are different panels for the Chiron with slightly different commands
// So we need to know what we are working with. // So we need to know what we are working with.
// Panel type can be defined otherwise detect it automatically // Panel type can be defined otherwise detect it automatically
if (panel_type == AC_panel_unknown) DetectPanelType(); switch (panel_type) {
case AC_panel_new:
SERIAL_ECHOLNF(AC_msg_new_panel_set);
break;
case AC_panel_standard:
SERIAL_ECHOLNF(AC_msg_old_panel_set);
break;
default:
SERIAL_ECHOLNF(AC_msg_auto_panel_detection);
DetectPanelType();
break;
}
// Signal Board has reset // Signal Board has reset
SendtoTFTLN(AC_msg_main_board_has_reset); SendtoTFTLN(AC_msg_main_board_has_reset);
@ -358,15 +368,14 @@ bool ChironTFT::ReadTFTCommand() {
} }
int8_t ChironTFT::FindToken(char c) { int8_t ChironTFT::FindToken(char c) {
int8_t pos = 0; for (int8_t pos = 0; pos < command_len; pos++) {
do {
if (panel_command[pos] == c) { if (panel_command[pos] == c) {
#if ACDEBUG(AC_INFO) #if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPGM("Tpos:", pos, " ", c); SERIAL_ECHOLNPGM("Tpos:", pos, " ", c);
#endif #endif
return pos; return pos;
} }
} while (++pos < command_len); }
#if ACDEBUG(AC_INFO) #if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPGM("Not found: ", c); SERIAL_ECHOLNPGM("Not found: ", c);
#endif #endif
@ -623,18 +632,18 @@ void ChironTFT::PanelAction(uint8_t req) {
SelectFile(); SelectFile();
break; break;
case 14: { // A14 Start Printing case 14: // A14 Start Printing
// Allows printer to restart the job if we don't want to recover // Allows printer to restart the job if we don't want to recover
if (printer_state == AC_printer_resuming_from_power_outage) { if (printer_state == AC_printer_resuming_from_power_outage) {
injectCommands(F("M1000 C")); // Cancel recovery injectCommands(F("M1000 C")); // Cancel recovery
printer_state = AC_printer_idle; printer_state = AC_printer_idle;
} }
#if ACDebugLevel >= 1 #if ACDebugLevel >= 1
SERIAL_ECHOLNPAIR_F("Print: ", selectedfile); SERIAL_ECHOLNPGM("Print: ", selectedfile);
#endif #endif
printFile(selectedfile); printFile(selectedfile);
SendtoTFTLN(AC_msg_print_from_sd_card); SendtoTFTLN(AC_msg_print_from_sd_card);
} break; break;
case 15: // A15 Resuming from outage case 15: // A15 Resuming from outage
if (printer_state == AC_printer_resuming_from_power_outage) { if (printer_state == AC_printer_resuming_from_power_outage) {
@ -801,25 +810,22 @@ void ChironTFT::PanelProcess(uint8_t req) {
} }
} break; } break;
case 30: { // A30 Auto leveling case 30: // A30 Auto leveling
if (FindToken('S') != -1) { // Start probing New panel adds spaces.. if (FindToken('S') != -1) { // Start probing New panel adds spaces..
// Ignore request if printing // Ignore request if printing
if (isPrinting()) if (isPrinting())
SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling
else { else {
SendtoTFTLN(AC_msg_start_probing); SendtoTFTLN(AC_msg_start_probing);
injectCommands(F("G28\nG29")); injectCommands(F("G28\nG29"));
printer_state = AC_printer_probing; printer_state = AC_printer_probing;
} }
} }
else { else
SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu
} break;
} break;
case 31: { // A31 Adjust all Probe Points case 31: // A31 Adjust all Probe Points
// The tokens can occur in different places on the new panel so we need to find it. // The tokens can occur in different places on the new panel so we need to find it.
if (FindToken('C') != -1) { // Restore and apply original offsets if (FindToken('C') != -1) { // Restore and apply original offsets
@ -907,18 +913,18 @@ void ChironTFT::PanelProcess(uint8_t req) {
} }
} }
} }
} break; break;
case 32: { // A32 clean leveling beep flag case 32: // A32 clean leveling beep flag
// Ignore request if printing // Ignore request if printing
//if (isPrinting()) break; //if (isPrinting()) break;
//injectCommands(F("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000")); //injectCommands(F("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000"));
//TFTSer.println(); //TFTSer.println();
} break; break;
// A33 firmware info request see PanelInfo() // A33 firmware info request see PanelInfo()
case 34: { // A34 Adjust single mesh point A34 C/S X1 Y1 V123 case 34: // A34 Adjust single mesh point A34 C/S X1 Y1 V123
if (panel_command[3] == 'C') { // Restore original offsets if (panel_command[3] == 'C') { // Restore original offsets
injectCommands(F("M501\nM420 S1")); injectCommands(F("M501\nM420 S1"));
selectedmeshpoint.x = selectedmeshpoint.y = 99; selectedmeshpoint.x = selectedmeshpoint.y = 99;
@ -950,7 +956,7 @@ void ChironTFT::PanelProcess(uint8_t req) {
} }
} }
} }
} break; break;
case 36: // A36 Auto leveling for new TFT bet that was a typo in the panel code! case 36: // A36 Auto leveling for new TFT bet that was a typo in the panel code!
SendtoTFTLN(AC_msg_start_probing); SendtoTFTLN(AC_msg_start_probing);

View File

@ -54,8 +54,8 @@ namespace ExtUI {
void onStatusChanged(const char * const msg) {} void onStatusChanged(const char * const msg) {}
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onPrintFinished() {} void onPrintDone() {}
void onFactoryReset() {} void onFactoryReset() {}
@ -95,7 +95,8 @@ namespace ExtUI {
#if HAS_MESH #if HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated // Called when any mesh points are updated

View File

@ -73,8 +73,8 @@ namespace ExtUI {
void onStatusChanged(const char * const msg) { ScreenHandler.setstatusmessage(msg); } void onStatusChanged(const char * const msg) { ScreenHandler.setstatusmessage(msg); }
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onPrintFinished() {} void onPrintDone() {}
void onFactoryReset() {} void onFactoryReset() {}
@ -113,7 +113,8 @@ namespace ExtUI {
} }
#if HAS_MESH #if HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated // Called when any mesh points are updated

View File

@ -83,8 +83,8 @@ namespace ExtUI {
} }
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onPrintFinished() {} void onPrintDone() {}
void onFactoryReset() { void onFactoryReset() {
dgus_screen_handler.SettingsReset(); dgus_screen_handler.SettingsReset();
@ -109,7 +109,8 @@ namespace ExtUI {
} }
#if HAS_MESH #if HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
dgus_screen_handler.MeshUpdate(xpos, ypos); dgus_screen_handler.MeshUpdate(xpos, ypos);

View File

@ -59,8 +59,8 @@ namespace ExtUI {
void onStatusChanged(const char * const msg) {} void onStatusChanged(const char * const msg) {}
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onPrintFinished() {} void onPrintDone() {}
void onFactoryReset() {} void onFactoryReset() {}
@ -99,7 +99,8 @@ namespace ExtUI {
} }
#if HAS_MESH #if HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated // Called when any mesh points are updated

View File

@ -80,7 +80,7 @@ namespace ExtUI {
} }
void onPrintTimerPaused() {} void onPrintTimerPaused() {}
void onPrintFinished() {} void onPrintDone() {}
void onFilamentRunout(const extruder_t extruder) { void onFilamentRunout(const extruder_t extruder) {
char lcd_msg[30]; char lcd_msg[30];
@ -90,7 +90,7 @@ namespace ExtUI {
} }
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onFactoryReset() { InterfaceSettingsScreen::defaultSettings(); } void onFactoryReset() { InterfaceSettingsScreen::defaultSettings(); }
void onStoreSettings(char *buff) { InterfaceSettingsScreen::saveSettings(buff); } void onStoreSettings(char *buff) { InterfaceSettingsScreen::saveSettings(buff); }
@ -118,7 +118,8 @@ namespace ExtUI {
} }
#if HAS_LEVELING && HAS_MESH #if HAS_LEVELING && HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
void onMeshUpdate(const int8_t x, const int8_t y, const_float_t val) { BedMeshViewScreen::onMeshUpdate(x, y, val); } void onMeshUpdate(const int8_t x, const int8_t y, const_float_t val) { BedMeshViewScreen::onMeshUpdate(x, y, val); }
void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { BedMeshViewScreen::onMeshUpdate(x, y, state); } void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { BedMeshViewScreen::onMeshUpdate(x, y, state); }
#endif #endif

View File

@ -141,8 +141,8 @@ namespace ExtUI {
void onFilamentRunout(const extruder_t extruder) {} void onFilamentRunout(const extruder_t extruder) {}
void onUserConfirmRequired(const char * const) {} void onUserConfirmRequired(const char * const) {}
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onPrintFinished() {} void onPrintDone() {}
void onFactoryReset() {} void onFactoryReset() {}
void onStoreSettings(char*) {} void onStoreSettings(char*) {}
void onLoadSettings(const char*) {} void onLoadSettings(const char*) {}
@ -151,7 +151,8 @@ namespace ExtUI {
void onConfigurationStoreRead(bool) {} void onConfigurationStoreRead(bool) {}
#if HAS_MESH #if HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {} void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {}
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 ExtUI::probe_state_t state) {}
#endif #endif

View File

@ -50,8 +50,8 @@ namespace ExtUI {
void onStatusChanged(const char * const msg) { nextion.StatusChange(msg); } void onStatusChanged(const char * const msg) { nextion.StatusChange(msg); }
void onHomingStart() {} void onHomingStart() {}
void onHomingComplete() {} void onHomingDone() {}
void onPrintFinished() { nextion.PrintFinished(); } void onPrintDone() { nextion.PrintFinished(); }
void onFactoryReset() {} void onFactoryReset() {}
@ -90,7 +90,8 @@ namespace ExtUI {
} }
#if HAS_MESH #if HAS_MESH
void onMeshLevelingStart() {} void onLevelingStart() {}
void onLevelingDone() {}
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 // Called when any mesh points are updated

View File

@ -172,7 +172,8 @@ namespace ExtUI {
float getMeshPoint(const xy_uint8_t &pos); float getMeshPoint(const xy_uint8_t &pos);
void setMeshPoint(const xy_uint8_t &pos, const_float_t zval); void setMeshPoint(const xy_uint8_t &pos, const_float_t zval);
void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z); void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z);
void onMeshLevelingStart(); void onLevelingStart();
void onLevelingDone();
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval); void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval);
inline void onMeshUpdate(const xy_int8_t &pos, const_float_t zval) { onMeshUpdate(pos.x, pos.y, zval); } inline void onMeshUpdate(const xy_int8_t &pos, const_float_t zval) { onMeshUpdate(pos.x, pos.y, zval); }
@ -403,14 +404,14 @@ namespace ExtUI {
void onPrintTimerStarted(); void onPrintTimerStarted();
void onPrintTimerPaused(); void onPrintTimerPaused();
void onPrintTimerStopped(); void onPrintTimerStopped();
void onPrintFinished(); void onPrintDone();
void onFilamentRunout(const extruder_t extruder); void onFilamentRunout(const extruder_t extruder);
void onUserConfirmRequired(const char * const msg); void onUserConfirmRequired(const char * const msg);
void onUserConfirmRequired(FSTR_P const fstr); void onUserConfirmRequired(FSTR_P const fstr);
void onStatusChanged(const char * const msg); void onStatusChanged(const char * const msg);
void onStatusChanged(FSTR_P const fstr); void onStatusChanged(FSTR_P const fstr);
void onHomingStart(); void onHomingStart();
void onHomingComplete(); void onHomingDone();
void onSteppersDisabled(); void onSteppersDisabled();
void onSteppersEnabled(); void onSteppersEnabled();
void onFactoryReset(); void onFactoryReset();