From fd0ed1f0eac44b5564110ce8db2d632dad13c66f Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Mon, 30 Dec 2019 11:32:27 +0100 Subject: [PATCH] Move LA reset from G28 to G80, do not reset on 0 In preparation for #2161, use MBL (G80) as a "new print" boundary instead of just re-homing to ensure the reset is issued only once for each print. Similarly, do not reset the autodetection when LA is disabled via M900 K0. This can/will be used during a print if different quality settings are used for different filling roles. --- Firmware/Marlin_main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 9a0977ab..97fbdf7f 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2078,7 +2078,6 @@ inline void gcode_M900() { SERIAL_ECHOLNPGM("K out of allowed range!"); #else if (newK == 0) { - la10c_reset(); extruder_advance_K = 0; } else if(newK > 0) @@ -4148,9 +4147,6 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) // -------------------------------------------- case 28: { -#ifndef LA_NOCOMPAT - la10c_reset(); -#endif long home_x_value = 0; long home_y_value = 0; long home_z_value = 0; @@ -4674,6 +4670,11 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) case_G80: { mesh_bed_leveling_flag = true; +#ifndef LA_NOCOMPAT + // When printing via USB there's no clear boundary between prints. Abuse MBL to indicate + // the beginning of a new print, allowing a new autodetected setting just after G80. + la10c_reset(); +#endif #ifndef PINDA_THERMISTOR static bool run = false; // thermistor-less PINDA temperature compensation is running #endif // ndef PINDA_THERMISTOR