mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 20:18:52 +00:00
Fix probe temp calibration (#16718)
This commit is contained in:
parent
8737c35ded
commit
1db9d9f76f
@ -48,10 +48,10 @@ class ProbeTempComp {
|
||||
public:
|
||||
|
||||
static constexpr temp_calib_t cali_info_init[TSI_COUNT] = {
|
||||
{ 30, 10, 5, 30 + 10 * 5 }, // Probe
|
||||
{ 60, 10, 5, 60 + 10 * 5 }, // Bed
|
||||
{ 10, 5, 30, 30 + 10 * 5 }, // Probe
|
||||
{ 10, 5, 60, 60 + 10 * 5 }, // Bed
|
||||
#if ENABLED(USE_TEMP_EXT_COMPENSATION)
|
||||
{ 180, 5, 20, 180 + 5 * 20 } // Extruder
|
||||
{ 20, 5, 180, 180 + 5 * 20 } // Extruder
|
||||
#endif
|
||||
};
|
||||
static const temp_calib_t cali_info[TSI_COUNT];
|
||||
|
@ -256,7 +256,7 @@ void GcodeSuite::G76() {
|
||||
|
||||
// Initialize temperatures
|
||||
uint16_t target_bed = temp_comp.probe_calib_bed_temp,
|
||||
target_probe = temp_comp.cali_info_init[TSI_BED].start_temp;
|
||||
target_probe = temp_comp.cali_info_init[TSI_PROBE].start_temp;
|
||||
thermalManager.setTargetBed(target_bed);
|
||||
SERIAL_ECHOLNPGM("Waiting for bed and probe temperature.");
|
||||
while (fabs(thermalManager.degBed() - float(target_bed)) > 0.1f
|
||||
@ -332,13 +332,13 @@ void GcodeSuite::G76() {
|
||||
else
|
||||
SERIAL_ECHOLNPAIR_F("Measured: ", measured_z);
|
||||
|
||||
if (target_probe == temp_comp.cali_info_init[TSI_BED].start_temp)
|
||||
if (target_probe == temp_comp.cali_info_init[TSI_PROBE].start_temp)
|
||||
temp_comp.prepare_new_calibration(measured_z);
|
||||
else
|
||||
temp_comp.push_back_new_measurement(TSI_PROBE, measured_z);
|
||||
|
||||
target_probe += temp_comp.cali_info_init[TSI_BED].temp_res;
|
||||
if (target_probe > temp_comp.cali_info_init[TSI_BED].end_temp) break;
|
||||
target_probe += temp_comp.cali_info_init[TSI_PROBE].temp_res;
|
||||
if (target_probe > temp_comp.cali_info_init[TSI_PROBE].end_temp) break;
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());
|
||||
|
Loading…
Reference in New Issue
Block a user