Pārlūkot izejas kodu

Add zprobe_zoffset in set_bed_level_equation_*

- Also a small tweak to SanityCheck.h
Scott Lahteine 9 gadus atpakaļ
vecāks
revīzija
04328d7537
2 mainītis faili ar 6 papildinājumiem un 7 dzēšanām
  1. 2
    3
      Marlin/Marlin_main.cpp
  2. 4
    4
      Marlin/SanityCheck.h

+ 2
- 3
Marlin/Marlin_main.cpp Parādīt failu

@@ -1090,7 +1090,7 @@ static void set_bed_level_equation_lsq(double *plane_equation_coefficients)
1090 1090
 //    corrected_position.debug("position after");
1091 1091
     current_position[X_AXIS] = corrected_position.x;
1092 1092
     current_position[Y_AXIS] = corrected_position.y;
1093
-    current_position[Z_AXIS] = corrected_position.z;
1093
+    current_position[Z_AXIS] = corrected_position.z + zprobe_zoffset;
1094 1094
 
1095 1095
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1096 1096
 }
@@ -1116,10 +1116,9 @@ static void set_bed_level_equation_3pts(float z_at_pt_1, float z_at_pt_2, float
1116 1116
     vector_3 corrected_position = plan_get_position();
1117 1117
     current_position[X_AXIS] = corrected_position.x;
1118 1118
     current_position[Y_AXIS] = corrected_position.y;
1119
-    current_position[Z_AXIS] = corrected_position.z;
1119
+    current_position[Z_AXIS] = corrected_position.z + zprobe_zoffset;
1120 1120
 
1121 1121
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1122
-
1123 1122
 }
1124 1123
 
1125 1124
 #endif // AUTO_BED_LEVELING_GRID

+ 4
- 4
Marlin/SanityCheck.h Parādīt failu

@@ -104,13 +104,13 @@
104 104
 
105 105
       // Make sure probing points are reachable
106 106
       #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
107
-        #error The given LEFT_PROBE_BED_POSITION can't be reached by the probe.
107
+        #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
108 108
       #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
109
-        #error The given RIGHT_PROBE_BED_POSITION can't be reached by the probe.
109
+        #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
110 110
       #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
111
-        #error The given FRONT_PROBE_BED_POSITION can't be reached by the probe.
111
+        #error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
112 112
       #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
113
-        #error The given BACK_PROBE_BED_POSITION can't be reached by the probe.
113
+        #error "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
114 114
       #endif
115 115
 
116 116
       #define PROBE_SIZE_X (X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1))

Notiek ielāde…
Atcelt
Saglabāt