Browse Source

Merge pull request #5808 from thinkyhead/rc_delta_float_radius

Cast DELTA_PRINTABLE_RADIUS to float in sq()
Scott Lahteine 7 years ago
parent
commit
c64ecf95e2
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -2937,7 +2937,7 @@ bool position_is_reachable(float target[XYZ]
2937 2937
       return HYPOT2(dx - SCARA_OFFSET_X, dy - SCARA_OFFSET_Y) <= sq(L1 + L2);
2938 2938
     #endif
2939 2939
   #elif ENABLED(DELTA)
2940
-    return HYPOT2(dx, dy) <= sq(DELTA_PRINTABLE_RADIUS);
2940
+    return HYPOT2(dx, dy) <= sq((float)(DELTA_PRINTABLE_RADIUS));
2941 2941
   #else
2942 2942
     const float dz = RAW_Z_POSITION(target[Z_AXIS]);
2943 2943
     return dx >= X_MIN_POS - 0.0001 && dx <= X_MAX_POS + 0.0001

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -1554,7 +1554,7 @@ KeepDrawing:
1554 1554
       // This assumes the center is 0,0
1555 1555
       #if ENABLED(DELTA)
1556 1556
         if (axis != Z_AXIS) {
1557
-          max = sqrt(sq(DELTA_PRINTABLE_RADIUS) - sq(current_position[Y_AXIS - axis]));
1557
+          max = sqrt(sq((float)(DELTA_PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis]));
1558 1558
           min = -max;
1559 1559
         }
1560 1560
       #endif

Loading…
Cancel
Save