Переглянути джерело

Merge pull request #4476 from otvald/RCBugFix

FIX for endstop adjustemt on delta is offset
Scott Lahteine 8 роки тому
джерело
коміт
f388beafa1
1 змінених файлів з 4 додано та 2 видалено
  1. 4
    2
      Marlin/Marlin_main.cpp

+ 4
- 2
Marlin/Marlin_main.cpp Переглянути файл

2414
   // Move slowly towards the endstop until triggered
2414
   // Move slowly towards the endstop until triggered
2415
   line_to_axis_pos(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis));
2415
   line_to_axis_pos(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis));
2416
 
2416
 
2417
+  // reset current_position to 0 to reflect hitting endpoint
2418
+  current_position[axis] = 0;
2419
+  sync_plan_position();
2420
+
2417
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2421
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2418
     if (DEBUGGING(LEVELING)) DEBUG_POS("> TRIGGER ENDSTOP", current_position);
2422
     if (DEBUGGING(LEVELING)) DEBUG_POS("> TRIGGER ENDSTOP", current_position);
2419
   #endif
2423
   #endif
2430
         lockZ1 = (z_endstop_adj < 0);
2434
         lockZ1 = (z_endstop_adj < 0);
2431
 
2435
 
2432
       if (lockZ1) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
2436
       if (lockZ1) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
2433
-      sync_plan_position();
2434
 
2437
 
2435
       // Move to the adjusted endstop height
2438
       // Move to the adjusted endstop height
2436
       line_to_axis_pos(axis, adj);
2439
       line_to_axis_pos(axis, adj);
2443
   #if ENABLED(DELTA)
2446
   #if ENABLED(DELTA)
2444
     // retrace by the amount specified in endstop_adj
2447
     // retrace by the amount specified in endstop_adj
2445
     if (endstop_adj[axis] * axis_home_dir < 0) {
2448
     if (endstop_adj[axis] * axis_home_dir < 0) {
2446
-      sync_plan_position();
2447
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2449
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2448
         if (DEBUGGING(LEVELING)) {
2450
         if (DEBUGGING(LEVELING)) {
2449
           SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);
2451
           SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);

Завантаження…
Відмінити
Зберегти