From 40ffea64ab5a98d0c2594e626562d302c1903bc7 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Tue, 16 Jun 2020 01:09:40 +0200 Subject: [PATCH] Do not compile temperature compensation code for PINDAv1 if PINDA_THERMISTOR macro is defined. This saves nearly all of additional FLASH usage of previous commit. It is only 70B worse than if no skipping is done in temperature compensation gcode G76. --- Firmware/Marlin_main.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index c18da74c5..48636adaf 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -4562,6 +4562,8 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) ### G76 - PINDA probe temperature calibration G76: PINDA probe temperature calibration This G-code is used to calibrate the temperature drift of the PINDA (inductive Sensor). + superPINDA sensor + The PINDAv2 sensor has a built-in thermistor which has the advantage that the calibration can be done once for all materials. The Original i3 Prusa MK2/s uses PINDAv1 and this calibration improves the temperature drift, but not as good as the PINDAv2. @@ -4580,8 +4582,13 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) case 76: { #ifdef PINDA_THERMISTOR - if (has_temperature_compensation()) + if (true) { + if (!has_temperature_compensation()) + { + SERIAL_ECHOLNPGM("No PINDA thermistor"); + break; + } if (calibration_status() >= CALIBRATION_STATUS_XYZ_CALIBRATION) { //we need to know accurate position of first calibration point @@ -4727,7 +4734,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) break; } -#endif //PINDA_THERMISTOR +#else //PINDA_THERMISTOR setTargetBed(PINDA_MIN_T); float zero_z; @@ -4828,7 +4835,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) lcd_update(2); - +#endif //PINDA_THERMISTOR } break;