Browse Source

[2.0.x] Fix for #8604 (#8717)

* Nozzle.cpp: replace incorrect M_2_PI (2/pi) with 2.0 * M_PI

* Use RADIANS(360) instead of 2 * M_PI
pull/1/head
Jonathan Barchi 7 years ago
committed by Scott Lahteine
parent
commit
cffd052fee
  1. 4
      Marlin/src/libs/nozzle.cpp

4
Marlin/src/libs/nozzle.cpp

@ -124,8 +124,8 @@
for (uint8_t s = 0; s < strokes; s++) for (uint8_t s = 0; s < strokes; s++)
for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++) for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++)
do_blocking_move_to_xy( do_blocking_move_to_xy(
middle.x + sin((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius, middle.x + sin((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius,
middle.y + cos((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius middle.y + cos((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius
); );
// Let's be safe // Let's be safe

Loading…
Cancel
Save