From 955b3aa21b9374f00a122d8a662616c41a247615 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Mon, 21 Jun 2021 14:57:29 +0200 Subject: [PATCH] Reset Chiron TFT after successful G29. --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 9 +++++++++ Marlin/src/lcd/anycubic_touchscreen.cpp | 8 ++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index de695459..486ce0aa 100755 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -36,6 +36,10 @@ #include "../../../module/probe.h" #include "../../queue.h" +#ifdef KNUTWURST_TFT_LEVELING + #include "../../../lcd/HardwareSerial.h" +#endif + #if ENABLED(PROBE_TEMP_COMPENSATION) #include "../../../feature/probe_temp_comp.h" #include "../../../module/temperature.h" @@ -811,6 +815,11 @@ G29_TYPE GcodeSuite::G29() { if (!dryrun) extrapolate_unprobed_bed_level(); print_bilinear_leveling_grid(); + #if ENABLED(KNUTWURST_TFT_LEVELING) + HARDWARE_SERIAL_PROTOCOLPGM("J25"); // Autoleveling done! + HARDWARE_SERIAL_ENTER(); + #endif + refresh_bed_level(); #if ENABLED(ABL_BILINEAR_SUBDIVISION) diff --git a/Marlin/src/lcd/anycubic_touchscreen.cpp b/Marlin/src/lcd/anycubic_touchscreen.cpp index 2e3fa765..b4ce164c 100755 --- a/Marlin/src/lcd/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/anycubic_touchscreen.cpp @@ -2031,14 +2031,10 @@ void AnycubicTouchscreenClass::GetCommandFromTFT() //SERIAL_ECHOLNPGM("Z Up"); setAxisPosition_mm(5.0,Z); //report_current_position(); - - //SERIAL_ECHOLNPGM("Move X"); setAxisPosition_mm(_GET_MESH_X(mx),X); //report_current_position(); - //SERIAL_ECHOLNPGM("Move Y"); setAxisPosition_mm(_GET_MESH_Y(my),Y); //report_current_position(); - //SERIAL_ECHOLNPGM("Z Down"); setAxisPosition_mm(EXT_LEVEL_HIGH,Z); report_current_position(); @@ -2058,7 +2054,7 @@ void AnycubicTouchscreenClass::GetCommandFromTFT() HARDWARE_SERIAL_ENTER(); } if(CodeSeen('S') ) { - queue.enqueue_now_P(PSTR("G28\nG29")); + queue.enqueue_now_P(PSTR("G28\nG29\nG28")); } break; case 31: // A31 z-offset @@ -2144,7 +2140,7 @@ void AnycubicTouchscreenClass::GetCommandFromTFT() HARDWARE_SERIAL_ENTER(); } if(CodeSeen('S') ) { - queue.enqueue_now_P(PSTR("G28\nG29")); + queue.enqueue_now_P(PSTR("G28\nG29\nG28")); } #endif