make custom Anycubic touchscreen implementation an ExtUI module #409

Merged
stklcode merged 2 commits from feature/extui into master 2023-01-03 06:00:30 -06:00
10 changed files with 181 additions and 54 deletions
Showing only changes of commit b115276fee - Show all commits

View File

@@ -806,11 +806,6 @@ G29_TYPE GcodeSuite::G29() {
bedlevel.set_grid(abl.gridSpacing, abl.probe_position_lf);
COPY(bedlevel.z_values, abl.z_values);
TERN_(IS_KINEMATIC, bedlevel.extrapolate_unprobed_bed_level());
#if ENABLED(KNUTWURST_TFT_LEVELING)
LCD_SERIAL.print("J25\r\n"); // Autoleveling done!
#endif
bedlevel.refresh_bed_level();
bedlevel.print_leveling_grid();

View File

@@ -2333,5 +2333,11 @@
#endif
}
#if ENABLED(KNUTWURST_TFT_LEVELING)
void AnycubicTouchscreenClass::LevelingDone() {
SENDLINE_DBG_PGM("J25", "TFT Serial Debug: Auto leveling done... J25");
}
#endif
AnycubicTouchscreenClass AnycubicTouchscreen;
#endif // ifdef ANYCUBIC_TOUCHSCREEN

View File

@@ -259,6 +259,9 @@ void KillTFT();
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
void Command(const char * const command);
#endif
#if ENABLED(KNUTWURST_TFT_LEVELING)
void LevelingDone();
#endif
char TFTstate = ANYCUBIC_TFT_STATE_IDLE;
/**

View File

@@ -92,7 +92,12 @@ namespace ExtUI {
#if HAS_MESH
void onLevelingStart() {}
void onLevelingDone() {}
void onLevelingDone() {
#if ENABLED(KNUTWURST_TFT_LEVELING)
AnycubicTouchscreen.LevelingDone();
#endif
}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated