From 1db9d9f76f43850539437e22745ea7f026e8a361 Mon Sep 17 00:00:00 2001
From: Neskik <axel.gouverneur@gmail.com>
Date: Thu, 30 Jan 2020 10:00:38 +0100
Subject: [PATCH] Fix probe temp calibration (#16718)

---
 Marlin/src/feature/probe_temp_compensation.h | 6 +++---
 Marlin/src/gcode/calibrate/G76_M871.cpp      | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Marlin/src/feature/probe_temp_compensation.h b/Marlin/src/feature/probe_temp_compensation.h
index 64f8cc7a06..91f652980b 100644
--- a/Marlin/src/feature/probe_temp_compensation.h
+++ b/Marlin/src/feature/probe_temp_compensation.h
@@ -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];
diff --git a/Marlin/src/gcode/calibrate/G76_M871.cpp b/Marlin/src/gcode/calibrate/G76_M871.cpp
index 0e0899fa7a..479f13d50c 100644
--- a/Marlin/src/gcode/calibrate/G76_M871.cpp
+++ b/Marlin/src/gcode/calibrate/G76_M871.cpp
@@ -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());
-- 
GitLab