Browse Source

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

Scott Lahteine 3 years ago
parent
commit
623c6b720b

+ 1
- 0
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

1219
     }
1219
     }
1220
   #endif
1220
   #endif
1221
   set_bed_leveling_enabled(ubl_state_at_invocation);
1221
   set_bed_leveling_enabled(ubl_state_at_invocation);
1222
+  TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
1222
 }
1223
 }
1223
 
1224
 
1224
 mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() {
1225
 mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() {

+ 7
- 3
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

419
 
419
 
420
     planner.synchronize();
420
     planner.synchronize();
421
 
421
 
422
+    TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
423
+
422
     #if ENABLED(AUTO_BED_LEVELING_3POINT)
424
     #if ENABLED(AUTO_BED_LEVELING_3POINT)
423
       if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
425
       if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
424
       points[0].z = points[1].z = points[2].z = 0;  // Probe at 3 arbitrary points
426
       points[0].z = points[1].z = points[2].z = 0;  // Probe at 3 arbitrary points
425
     #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
427
     #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
426
-      TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
427
-      TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart());
428
+      TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_LevelingStart());
428
     #endif
429
     #endif
429
 
430
 
430
     if (!faux) {
431
     if (!faux) {
577
         SERIAL_ECHOLNPGM("Grid probing done.");
578
         SERIAL_ECHOLNPGM("Grid probing done.");
578
         // Re-enable software endstops, if needed
579
         // Re-enable software endstops, if needed
579
         SET_SOFT_ENDSTOP_LOOSE(false);
580
         SET_SOFT_ENDSTOP_LOOSE(false);
581
+        TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
580
       }
582
       }
581
 
583
 
582
     #elif ENABLED(AUTO_BED_LEVELING_3POINT)
584
     #elif ENABLED(AUTO_BED_LEVELING_3POINT)
606
           abl.reenable = false;
608
           abl.reenable = false;
607
         }
609
         }
608
 
610
 
611
+        TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
612
+
609
       }
613
       }
610
 
614
 
611
     #endif // AUTO_BED_LEVELING_3POINT
615
     #endif // AUTO_BED_LEVELING_3POINT
899
     process_subcommands_now(F(Z_PROBE_END_SCRIPT));
903
     process_subcommands_now(F(Z_PROBE_END_SCRIPT));
900
   #endif
904
   #endif
901
 
905
 
902
-  TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedLeveling());
906
+  TERN_(HAS_DWIN_E3V2_BASIC, DWIN_LevelingDone());
903
 
907
 
904
   TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index));
908
   TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index));
905
 
909
 

+ 3
- 2
Marlin/src/gcode/bedlevel/mbl/G29.cpp View File

104
       mbl_probe_index = 0;
104
       mbl_probe_index = 0;
105
       if (!ui.wait_for_move) {
105
       if (!ui.wait_for_move) {
106
         queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2"));
106
         queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2"));
107
-        TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
108
-        TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart());
107
+        TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
108
+        TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
109
         return;
109
         return;
110
       }
110
       }
111
       state = MeshNext;
111
       state = MeshNext;
168
         #endif
168
         #endif
169
 
169
 
170
         TERN_(LCD_BED_LEVELING, ui.wait_for_move = false);
170
         TERN_(LCD_BED_LEVELING, ui.wait_for_move = false);
171
+        TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
171
       }
172
       }
172
       break;
173
       break;
173
 
174
 

+ 3
- 3
Marlin/src/gcode/calibrate/G28.cpp View File

239
     set_and_report_grblstate(M_HOMING);
239
     set_and_report_grblstate(M_HOMING);
240
   #endif
240
   #endif
241
 
241
 
242
-  TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StartHoming());
242
+  TERN_(HAS_DWIN_E3V2_BASIC, DWIN_HomingStart());
243
   TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
243
   TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
244
 
244
 
245
   planner.synchronize();          // Wait for planner moves to finish!
245
   planner.synchronize();          // Wait for planner moves to finish!
552
 
552
 
553
   ui.refresh();
553
   ui.refresh();
554
 
554
 
555
-  TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedHoming());
556
-  TERN_(EXTENSIBLE_UI, ExtUI::onHomingComplete());
555
+  TERN_(HAS_DWIN_E3V2_BASIC, DWIN_HomingDone());
556
+  TERN_(EXTENSIBLE_UI, ExtUI::onHomingDone());
557
 
557
 
558
   report_current_position();
558
   report_current_position();
559
 
559
 

+ 1
- 1
Marlin/src/gcode/sd/M1001.cpp View File

108
     process_subcommands_now(F(SD_FINISHED_RELEASECOMMAND));
108
     process_subcommands_now(F(SD_FINISHED_RELEASECOMMAND));
109
   #endif
109
   #endif
110
 
110
 
111
-  TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished());
111
+  TERN_(EXTENSIBLE_UI, ExtUI::onPrintDone());
112
   TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());
112
   TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());
113
 
113
 
114
   // Re-select the last printed file in the UI
114
   // Re-select the last printed file in the UI

+ 2
- 2
Marlin/src/lcd/e3v2/creality/dwin.cpp View File

4281
   }
4281
   }
4282
 }
4282
 }
4283
 
4283
 
4284
-void DWIN_CompletedHoming() {
4284
+void DWIN_HomingDone() {
4285
   HMI_flag.home_flag = false;
4285
   HMI_flag.home_flag = false;
4286
   dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
4286
   dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
4287
   if (checkkey == Last_Prepare) {
4287
   if (checkkey == Last_Prepare) {
4297
   }
4297
   }
4298
 }
4298
 }
4299
 
4299
 
4300
-void DWIN_CompletedLeveling() {
4300
+void DWIN_LevelingDone() {
4301
   if (checkkey == Leveling) Goto_MainMenu();
4301
   if (checkkey == Leveling) Goto_MainMenu();
4302
 }
4302
 }
4303
 
4303
 

+ 3
- 3
Marlin/src/lcd/e3v2/creality/dwin.h View File

243
 void DWIN_StatusChanged(const char * const cstr=nullptr);
243
 void DWIN_StatusChanged(const char * const cstr=nullptr);
244
 void DWIN_StatusChanged(FSTR_P const fstr);
244
 void DWIN_StatusChanged(FSTR_P const fstr);
245
 
245
 
246
-inline void DWIN_StartHoming() { HMI_flag.home_flag = true; }
246
+inline void DWIN_HomingStart() { HMI_flag.home_flag = true; }
247
 
247
 
248
-void DWIN_CompletedHoming();
249
-void DWIN_CompletedLeveling();
248
+void DWIN_HomingDone();
249
+void DWIN_LevelingDone();

+ 4
- 4
Marlin/src/lcd/e3v2/proui/dwin.cpp View File

1542
   }
1542
   }
1543
 }
1543
 }
1544
 
1544
 
1545
-void DWIN_StartHoming() {
1545
+void DWIN_HomingStart() {
1546
   HMI_flag.home_flag = true;
1546
   HMI_flag.home_flag = true;
1547
   HMI_SaveProcessID(Homing);
1547
   HMI_SaveProcessID(Homing);
1548
   Title.ShowCaption(GET_TEXT_F(MSG_HOMING));
1548
   Title.ShowCaption(GET_TEXT_F(MSG_HOMING));
1549
   DWIN_Show_Popup(ICON_BLTouch, GET_TEXT_F(MSG_HOMING), GET_TEXT_F(MSG_PLEASE_WAIT));
1549
   DWIN_Show_Popup(ICON_BLTouch, GET_TEXT_F(MSG_HOMING), GET_TEXT_F(MSG_PLEASE_WAIT));
1550
 }
1550
 }
1551
 
1551
 
1552
-void DWIN_CompletedHoming() {
1552
+void DWIN_HomingDone() {
1553
   HMI_flag.home_flag = false;
1553
   HMI_flag.home_flag = false;
1554
   dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
1554
   dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
1555
   if (HMI_flag.abort_action) DWIN_Print_Aborted(); else HMI_ReturnScreen();
1555
   if (HMI_flag.abort_action) DWIN_Print_Aborted(); else HMI_ReturnScreen();
1556
 }
1556
 }
1557
 
1557
 
1558
-void DWIN_MeshLevelingStart() {
1558
+void DWIN_LevelingStart() {
1559
   #if HAS_ONESTEP_LEVELING
1559
   #if HAS_ONESTEP_LEVELING
1560
     HMI_SaveProcessID(Leveling);
1560
     HMI_SaveProcessID(Leveling);
1561
     Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING));
1561
     Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING));
1565
   #endif
1565
   #endif
1566
 }
1566
 }
1567
 
1567
 
1568
-void DWIN_CompletedLeveling() {
1568
+void DWIN_LevelingDone() {
1569
   TERN_(HAS_ONESTEP_LEVELING, if (planner.leveling_active) Goto_MeshViewer());
1569
   TERN_(HAS_ONESTEP_LEVELING, if (planner.leveling_active) Goto_MeshViewer());
1570
 }
1570
 }
1571
 
1571
 

+ 4
- 4
Marlin/src/lcd/e3v2/proui/dwin.h View File

142
 void DWIN_InitScreen();
142
 void DWIN_InitScreen();
143
 void DWIN_HandleScreen();
143
 void DWIN_HandleScreen();
144
 void DWIN_CheckStatusMessage();
144
 void DWIN_CheckStatusMessage();
145
-void DWIN_StartHoming();
146
-void DWIN_CompletedHoming();
145
+void DWIN_HomingStart();
146
+void DWIN_HomingDone();
147
 #if HAS_MESH
147
 #if HAS_MESH
148
   void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval);
148
   void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval);
149
 #endif
149
 #endif
150
-void DWIN_MeshLevelingStart();
151
-void DWIN_CompletedLeveling();
150
+void DWIN_LevelingStart();
151
+void DWIN_LevelingDone();
152
 void DWIN_PidTuning(pidresult_t result);
152
 void DWIN_PidTuning(pidresult_t result);
153
 void DWIN_Print_Started(const bool sd=false);
153
 void DWIN_Print_Started(const bool sd=false);
154
 void DWIN_Print_Pause();
154
 void DWIN_Print_Pause();

+ 7
- 4
Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp View File

57
 
57
 
58
   void onPrintTimerStarted() { Chiron.TimerEvent(AC_timer_started); }
58
   void onPrintTimerStarted() { Chiron.TimerEvent(AC_timer_started); }
59
   void onPrintTimerPaused()  { Chiron.TimerEvent(AC_timer_paused);  }
59
   void onPrintTimerPaused()  { Chiron.TimerEvent(AC_timer_paused);  }
60
-  void onPrintTimerStopped()                         { Chiron.TimerEvent(AC_timer_stopped); }
60
+  void onPrintTimerStopped() { Chiron.TimerEvent(AC_timer_stopped); }
61
+  void onPrintDone() {}
62
+
61
   void onFilamentRunout(const extruder_t)            { Chiron.FilamentRunout();             }
63
   void onFilamentRunout(const extruder_t)            { Chiron.FilamentRunout();             }
64
+
62
   void onUserConfirmRequired(const char * const msg) { Chiron.ConfirmationRequest(msg);     }
65
   void onUserConfirmRequired(const char * const msg) { Chiron.ConfirmationRequest(msg);     }
63
   void onStatusChanged(const char * const msg)       { Chiron.StatusChange(msg);            }
66
   void onStatusChanged(const char * const msg)       { Chiron.StatusChange(msg);            }
64
 
67
 
65
   void onHomingStart() {}
68
   void onHomingStart() {}
66
-  void onHomingComplete() {}
67
-  void onPrintFinished() {}
69
+  void onHomingDone() {}
68
 
70
 
69
   void onFactoryReset() {}
71
   void onFactoryReset() {}
70
 
72
 
103
   }
105
   }
104
 
106
 
105
   #if HAS_MESH
107
   #if HAS_MESH
106
-    void onMeshLevelingStart() {}
108
+    void onLevelingStart() {}
109
+    void onLevelingDone() {}
107
 
110
 
108
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
111
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
109
       // Called when any mesh points are updated
112
       // Called when any mesh points are updated

+ 27
- 21
Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp View File

86
   TFTSer.begin(115200);
86
   TFTSer.begin(115200);
87
 
87
 
88
   // wait for the TFT panel to initialise and finish the animation
88
   // wait for the TFT panel to initialise and finish the animation
89
-  delay_ms(250);
89
+  safe_delay(1000);
90
 
90
 
91
   // There are different panels for the Chiron with slightly different commands
91
   // There are different panels for the Chiron with slightly different commands
92
   // So we need to know what we are working with.
92
   // So we need to know what we are working with.
93
-
94
   // Panel type can be defined otherwise detect it automatically
93
   // Panel type can be defined otherwise detect it automatically
95
-  if (panel_type == AC_panel_unknown) DetectPanelType();
94
+  switch (panel_type) {
95
+    case AC_panel_new:
96
+      SERIAL_ECHOLNF(AC_msg_new_panel_set);
97
+      break;
98
+    case AC_panel_standard:
99
+      SERIAL_ECHOLNF(AC_msg_old_panel_set);
100
+      break;
101
+    default:
102
+      SERIAL_ECHOLNF(AC_msg_auto_panel_detection);
103
+      DetectPanelType();
104
+      break;
105
+  }
96
 
106
 
97
   // Signal Board has reset
107
   // Signal Board has reset
98
   SendtoTFTLN(AC_msg_main_board_has_reset);
108
   SendtoTFTLN(AC_msg_main_board_has_reset);
358
 }
368
 }
359
 
369
 
360
 int8_t ChironTFT::FindToken(char c) {
370
 int8_t ChironTFT::FindToken(char c) {
361
-  int8_t pos = 0;
362
-  do {
371
+  for (int8_t pos = 0; pos < command_len; pos++) {
363
     if (panel_command[pos] == c) {
372
     if (panel_command[pos] == c) {
364
       #if ACDEBUG(AC_INFO)
373
       #if ACDEBUG(AC_INFO)
365
         SERIAL_ECHOLNPGM("Tpos:", pos, " ", c);
374
         SERIAL_ECHOLNPGM("Tpos:", pos, " ", c);
366
       #endif
375
       #endif
367
       return pos;
376
       return pos;
368
     }
377
     }
369
-  } while (++pos < command_len);
378
+  }
370
   #if ACDEBUG(AC_INFO)
379
   #if ACDEBUG(AC_INFO)
371
     SERIAL_ECHOLNPGM("Not found: ", c);
380
     SERIAL_ECHOLNPGM("Not found: ", c);
372
   #endif
381
   #endif
623
       SelectFile();
632
       SelectFile();
624
       break;
633
       break;
625
 
634
 
626
-    case 14: { // A14 Start Printing
635
+    case 14:   // A14 Start Printing
627
       // Allows printer to restart the job if we don't want to recover
636
       // Allows printer to restart the job if we don't want to recover
628
       if (printer_state == AC_printer_resuming_from_power_outage) {
637
       if (printer_state == AC_printer_resuming_from_power_outage) {
629
         injectCommands(F("M1000 C")); // Cancel recovery
638
         injectCommands(F("M1000 C")); // Cancel recovery
630
         printer_state = AC_printer_idle;
639
         printer_state = AC_printer_idle;
631
       }
640
       }
632
       #if ACDebugLevel >= 1
641
       #if ACDebugLevel >= 1
633
-        SERIAL_ECHOLNPAIR_F("Print: ", selectedfile);
642
+        SERIAL_ECHOLNPGM("Print: ", selectedfile);
634
       #endif
643
       #endif
635
       printFile(selectedfile);
644
       printFile(selectedfile);
636
       SendtoTFTLN(AC_msg_print_from_sd_card);
645
       SendtoTFTLN(AC_msg_print_from_sd_card);
637
-    } break;
646
+      break;
638
 
647
 
639
     case 15:   // A15 Resuming from outage
648
     case 15:   // A15 Resuming from outage
640
       if (printer_state == AC_printer_resuming_from_power_outage) {
649
       if (printer_state == AC_printer_resuming_from_power_outage) {
801
       }
810
       }
802
     } break;
811
     } break;
803
 
812
 
804
-    case 30: {   // A30 Auto leveling
813
+    case 30:     // A30 Auto leveling
805
       if (FindToken('S') != -1) { // Start probing New panel adds spaces..
814
       if (FindToken('S') != -1) { // Start probing New panel adds spaces..
806
         // Ignore request if printing
815
         // Ignore request if printing
807
         if (isPrinting())
816
         if (isPrinting())
808
           SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling
817
           SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling
809
         else {
818
         else {
810
-
811
-
812
           SendtoTFTLN(AC_msg_start_probing);
819
           SendtoTFTLN(AC_msg_start_probing);
813
           injectCommands(F("G28\nG29"));
820
           injectCommands(F("G28\nG29"));
814
           printer_state = AC_printer_probing;
821
           printer_state = AC_printer_probing;
815
         }
822
         }
816
       }
823
       }
817
-      else {
824
+      else
818
         SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu
825
         SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu
819
-      }
820
-    } break;
826
+      break;
821
 
827
 
822
-    case 31: { // A31 Adjust all Probe Points
828
+    case 31:   // A31 Adjust all Probe Points
823
       // The tokens can occur in different places on the new panel so we need to find it.
829
       // The tokens can occur in different places on the new panel so we need to find it.
824
 
830
 
825
       if (FindToken('C') != -1) { // Restore and apply original offsets
831
       if (FindToken('C') != -1) { // Restore and apply original offsets
907
           }
913
           }
908
         }
914
         }
909
       }
915
       }
910
-    } break;
916
+      break;
911
 
917
 
912
-    case 32: { // A32 clean leveling beep flag
918
+    case 32:   // A32 clean leveling beep flag
913
       // Ignore request if printing
919
       // Ignore request if printing
914
       //if (isPrinting()) break;
920
       //if (isPrinting()) break;
915
       //injectCommands(F("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000"));
921
       //injectCommands(F("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000"));
916
       //TFTSer.println();
922
       //TFTSer.println();
917
-    } break;
923
+      break;
918
 
924
 
919
     // A33 firmware info request see PanelInfo()
925
     // A33 firmware info request see PanelInfo()
920
 
926
 
921
-    case 34: {  // A34 Adjust single mesh point A34 C/S X1 Y1 V123
927
+    case 34:    // A34 Adjust single mesh point A34 C/S X1 Y1 V123
922
       if (panel_command[3] == 'C') { // Restore original offsets
928
       if (panel_command[3] == 'C') { // Restore original offsets
923
         injectCommands(F("M501\nM420 S1"));
929
         injectCommands(F("M501\nM420 S1"));
924
         selectedmeshpoint.x = selectedmeshpoint.y = 99;
930
         selectedmeshpoint.x = selectedmeshpoint.y = 99;
950
           }
956
           }
951
         }
957
         }
952
       }
958
       }
953
-    }  break;
959
+      break;
954
 
960
 
955
     case 36:    // A36 Auto leveling for new TFT bet that was a typo in the panel code!
961
     case 36:    // A36 Auto leveling for new TFT bet that was a typo in the panel code!
956
       SendtoTFTLN(AC_msg_start_probing);
962
       SendtoTFTLN(AC_msg_start_probing);

+ 4
- 3
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp View File

54
   void onStatusChanged(const char * const msg) {}
54
   void onStatusChanged(const char * const msg) {}
55
 
55
 
56
   void onHomingStart() {}
56
   void onHomingStart() {}
57
-  void onHomingComplete() {}
58
-  void onPrintFinished() {}
57
+  void onHomingDone() {}
58
+  void onPrintDone() {}
59
 
59
 
60
   void onFactoryReset() {}
60
   void onFactoryReset() {}
61
 
61
 
95
 
95
 
96
   #if HAS_MESH
96
   #if HAS_MESH
97
 
97
 
98
-    void onMeshLevelingStart() {}
98
+    void onLevelingStart() {}
99
+    void onLevelingDone() {}
99
 
100
 
100
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
101
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
101
       // Called when any mesh points are updated
102
       // Called when any mesh points are updated

+ 4
- 3
Marlin/src/lcd/extui/dgus/dgus_extui.cpp View File

73
   void onStatusChanged(const char * const msg) { ScreenHandler.setstatusmessage(msg); }
73
   void onStatusChanged(const char * const msg) { ScreenHandler.setstatusmessage(msg); }
74
 
74
 
75
   void onHomingStart() {}
75
   void onHomingStart() {}
76
-  void onHomingComplete() {}
77
-  void onPrintFinished() {}
76
+  void onHomingDone() {}
77
+  void onPrintDone() {}
78
 
78
 
79
   void onFactoryReset() {}
79
   void onFactoryReset() {}
80
 
80
 
113
   }
113
   }
114
 
114
 
115
   #if HAS_MESH
115
   #if HAS_MESH
116
-    void onMeshLevelingStart() {}
116
+    void onLevelingStart() {}
117
+    void onLevelingDone() {}
117
 
118
 
118
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
119
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
119
       // Called when any mesh points are updated
120
       // Called when any mesh points are updated

+ 4
- 3
Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp View File

83
   }
83
   }
84
 
84
 
85
   void onHomingStart() {}
85
   void onHomingStart() {}
86
-  void onHomingComplete() {}
87
-  void onPrintFinished() {}
86
+  void onHomingDone() {}
87
+  void onPrintDone() {}
88
 
88
 
89
   void onFactoryReset() {
89
   void onFactoryReset() {
90
     dgus_screen_handler.SettingsReset();
90
     dgus_screen_handler.SettingsReset();
109
   }
109
   }
110
 
110
 
111
   #if HAS_MESH
111
   #if HAS_MESH
112
-    void onMeshLevelingStart() {}
112
+    void onLevelingStart() {}
113
+    void onLevelingDone() {}
113
 
114
 
114
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
115
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
115
       dgus_screen_handler.MeshUpdate(xpos, ypos);
116
       dgus_screen_handler.MeshUpdate(xpos, ypos);

+ 4
- 3
Marlin/src/lcd/extui/example/example.cpp View File

59
   void onStatusChanged(const char * const msg) {}
59
   void onStatusChanged(const char * const msg) {}
60
 
60
 
61
   void onHomingStart() {}
61
   void onHomingStart() {}
62
-  void onHomingComplete() {}
63
-  void onPrintFinished() {}
62
+  void onHomingDone() {}
63
+  void onPrintDone() {}
64
 
64
 
65
   void onFactoryReset() {}
65
   void onFactoryReset() {}
66
 
66
 
99
   }
99
   }
100
 
100
 
101
   #if HAS_MESH
101
   #if HAS_MESH
102
-    void onMeshLevelingStart() {}
102
+    void onLevelingStart() {}
103
+    void onLevelingDone() {}
103
 
104
 
104
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
105
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
105
       // Called when any mesh points are updated
106
       // Called when any mesh points are updated

+ 4
- 3
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp View File

80
   }
80
   }
81
 
81
 
82
   void onPrintTimerPaused() {}
82
   void onPrintTimerPaused() {}
83
-  void onPrintFinished() {}
83
+  void onPrintDone() {}
84
 
84
 
85
   void onFilamentRunout(const extruder_t extruder) {
85
   void onFilamentRunout(const extruder_t extruder) {
86
     char lcd_msg[30];
86
     char lcd_msg[30];
90
   }
90
   }
91
 
91
 
92
   void onHomingStart() {}
92
   void onHomingStart() {}
93
-  void onHomingComplete() {}
93
+  void onHomingDone() {}
94
 
94
 
95
   void onFactoryReset() { InterfaceSettingsScreen::defaultSettings(); }
95
   void onFactoryReset() { InterfaceSettingsScreen::defaultSettings(); }
96
   void onStoreSettings(char *buff) { InterfaceSettingsScreen::saveSettings(buff); }
96
   void onStoreSettings(char *buff) { InterfaceSettingsScreen::saveSettings(buff); }
118
   }
118
   }
119
 
119
 
120
   #if HAS_LEVELING && HAS_MESH
120
   #if HAS_LEVELING && HAS_MESH
121
-    void onMeshLevelingStart() {}
121
+    void onLevelingStart() {}
122
+    void onLevelingDone() {}
122
     void onMeshUpdate(const int8_t x, const int8_t y, const_float_t val) { BedMeshViewScreen::onMeshUpdate(x, y, val); }
123
     void onMeshUpdate(const int8_t x, const int8_t y, const_float_t val) { BedMeshViewScreen::onMeshUpdate(x, y, val); }
123
     void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { BedMeshViewScreen::onMeshUpdate(x, y, state); }
124
     void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { BedMeshViewScreen::onMeshUpdate(x, y, state); }
124
   #endif
125
   #endif

+ 4
- 3
Marlin/src/lcd/extui/malyan/malyan_extui.cpp View File

141
   void onFilamentRunout(const extruder_t extruder) {}
141
   void onFilamentRunout(const extruder_t extruder) {}
142
   void onUserConfirmRequired(const char * const) {}
142
   void onUserConfirmRequired(const char * const) {}
143
   void onHomingStart() {}
143
   void onHomingStart() {}
144
-  void onHomingComplete() {}
145
-  void onPrintFinished() {}
144
+  void onHomingDone() {}
145
+  void onPrintDone() {}
146
   void onFactoryReset() {}
146
   void onFactoryReset() {}
147
   void onStoreSettings(char*) {}
147
   void onStoreSettings(char*) {}
148
   void onLoadSettings(const char*) {}
148
   void onLoadSettings(const char*) {}
151
   void onConfigurationStoreRead(bool) {}
151
   void onConfigurationStoreRead(bool) {}
152
 
152
 
153
   #if HAS_MESH
153
   #if HAS_MESH
154
-    void onMeshLevelingStart() {}
154
+    void onLevelingStart() {}
155
+    void onLevelingDone() {}
155
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {}
156
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {}
156
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {}
157
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {}
157
   #endif
158
   #endif

+ 4
- 3
Marlin/src/lcd/extui/nextion/nextion_extui.cpp View File

50
   void onStatusChanged(const char * const msg)       { nextion.StatusChange(msg);        }
50
   void onStatusChanged(const char * const msg)       { nextion.StatusChange(msg);        }
51
 
51
 
52
   void onHomingStart()    {}
52
   void onHomingStart()    {}
53
-  void onHomingComplete() {}
54
-  void onPrintFinished()                             { nextion.PrintFinished(); }
53
+  void onHomingDone() {}
54
+  void onPrintDone()                             { nextion.PrintFinished(); }
55
 
55
 
56
   void onFactoryReset()   {}
56
   void onFactoryReset()   {}
57
 
57
 
90
   }
90
   }
91
 
91
 
92
   #if HAS_MESH
92
   #if HAS_MESH
93
-    void onMeshLevelingStart() {}
93
+    void onLevelingStart() {}
94
+    void onLevelingDone() {}
94
 
95
 
95
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
96
     void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
96
       // Called when any mesh points are updated
97
       // Called when any mesh points are updated

+ 4
- 3
Marlin/src/lcd/extui/ui_api.h View File

172
       float getMeshPoint(const xy_uint8_t &pos);
172
       float getMeshPoint(const xy_uint8_t &pos);
173
       void setMeshPoint(const xy_uint8_t &pos, const_float_t zval);
173
       void setMeshPoint(const xy_uint8_t &pos, const_float_t zval);
174
       void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z);
174
       void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z);
175
-      void onMeshLevelingStart();
175
+      void onLevelingStart();
176
+      void onLevelingDone();
176
       void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval);
177
       void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval);
177
       inline void onMeshUpdate(const xy_int8_t &pos, const_float_t zval) { onMeshUpdate(pos.x, pos.y, zval); }
178
       inline void onMeshUpdate(const xy_int8_t &pos, const_float_t zval) { onMeshUpdate(pos.x, pos.y, zval); }
178
 
179
 
403
   void onPrintTimerStarted();
404
   void onPrintTimerStarted();
404
   void onPrintTimerPaused();
405
   void onPrintTimerPaused();
405
   void onPrintTimerStopped();
406
   void onPrintTimerStopped();
406
-  void onPrintFinished();
407
+  void onPrintDone();
407
   void onFilamentRunout(const extruder_t extruder);
408
   void onFilamentRunout(const extruder_t extruder);
408
   void onUserConfirmRequired(const char * const msg);
409
   void onUserConfirmRequired(const char * const msg);
409
   void onUserConfirmRequired(FSTR_P const fstr);
410
   void onUserConfirmRequired(FSTR_P const fstr);
410
   void onStatusChanged(const char * const msg);
411
   void onStatusChanged(const char * const msg);
411
   void onStatusChanged(FSTR_P const fstr);
412
   void onStatusChanged(FSTR_P const fstr);
412
   void onHomingStart();
413
   void onHomingStart();
413
-  void onHomingComplete();
414
+  void onHomingDone();
414
   void onSteppersDisabled();
415
   void onSteppersDisabled();
415
   void onSteppersEnabled();
416
   void onSteppersEnabled();
416
   void onFactoryReset();
417
   void onFactoryReset();

Loading…
Cancel
Save