Browse Source

Neater position_is_reachable call

Scott Lahteine 6 years ago
parent
commit
0938c62b48
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      Marlin/Marlin_main.cpp

+ 5
- 4
Marlin/Marlin_main.cpp View File

@@ -2359,10 +2359,11 @@ static void clean_up_after_endstop_or_probe_move() {
2359 2359
 
2360 2360
     const float nx = lx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ly - (Y_PROBE_OFFSET_FROM_EXTRUDER);
2361 2361
 
2362
-    if (printable) {
2363
-      if (!position_is_reachable_by_probe_xy(lx, ly)) return NAN;
2364
-    }
2365
-    else if (!position_is_reachable_xy(nx, ny)) return NAN;
2362
+    if (printable
2363
+      ? !position_is_reachable_xy(nx, ny)
2364
+      : !position_is_reachable_by_probe_xy(lx, ly)
2365
+    ) return NAN;
2366
+
2366 2367
 
2367 2368
     const float old_feedrate_mm_s = feedrate_mm_s;
2368 2369
 

Loading…
Cancel
Save