diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 501b37d9..8dbc0d84 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -4561,13 +4561,15 @@ 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. + superPINDA sensor has internal temperature compensation and no thermistor output. There is no point of doing temperature calibration in such case. + If PINDA_THERMISTOR and DETECT_SUPERPINDA is defined during compilation, calibration is skipped with serial message "No PINDA thermistor". + This can be caused also if PINDA thermistor connection is broken or PINDA temperature is lower than PINDA_MINTEMP. + #### Example ``` @@ -10493,7 +10495,11 @@ float temp_comp_interpolation(float inp_temperature) { if (i>0) EEPROM_read_B(EEPROM_PROBE_TEMP_SHIFT + (i-1) * 2, &shift[i]); //read shift in steps from EEPROM temp_C[i] = 50 + i * 10; //temperature in C #ifdef PINDA_THERMISTOR - temp_C[i] = 35 + i * 5; //temperature in C + constexpr int start_compensating_temp = 35; + temp_C[i] = start_compensating_temp + i * 5; //temperature in degrees C +#ifdef DETECT_SUPERPINDA + static_assert(start_compensating_temp >= PINDA_MINTEMP, "Temperature compensation start point is lower than PINDA_MINTEMP."); +#endif //DETECT_SUPERPINDA #else temp_C[i] = 50 + i * 10; //temperature in C #endif diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index bd232cf5..6e9b6985 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -2197,6 +2197,11 @@ float unscalePID_d(float d) #endif //PIDTEMP #ifdef PINDA_THERMISTOR +//! @brief PINDA thermistor detected +//! +//! @retval true firmware should do temperature compensation and allow calibration +//! @retval false PINDA thermistor is not detected, disable temperature compensation and calibration +//! bool has_temperature_compensation() { #ifdef DETECT_SUPERPINDA