소스 검색

z-probe offset fix (PR#2361)

verified via 1.0.2 tag that compiles by multiple people,
credit for the fix goes to paulusjacobus for the initial find and
sniffle for the correction so M851 works.
Todd Swindoll 10 년 전
부모
커밋
a111fbbd0a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      Marlin/Marlin_main.cpp

+ 2
- 1
Marlin/Marlin_main.cpp 파일 보기

@@ -2835,7 +2835,8 @@ inline void gcode_G28() {
2835 2835
               real_z = (float)st_get_position(Z_AXIS) / axis_steps_per_unit[Z_AXIS];  //get the real Z (since the auto bed leveling is already correcting the plane)
2836 2836
 
2837 2837
         apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp); // Apply the correction sending the probe offset
2838
-        current_position[Z_AXIS] += z_tmp - real_z;                     // The difference is added to current position and sent to planner.
2838
+        //line below controls z probe offset, zprobe_zoffset is the actual offset that can be modified via m851
2839
+        current_position[Z_AXIS] = z_tmp - real_z + zprobe_zoffset;                     // The difference is added to current position and sent to planner.
2839 2840
         sync_plan_position();
2840 2841
       }
2841 2842
     #endif // !DELTA

Loading…
취소
저장