Browse Source

Fix acosx condition (#17846)

vanilla_fb_2.0.x
Štěpán Dalecký 5 years ago
committed by GitHub
parent
commit
ebe8f2c605
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Marlin/src/module/planner.cpp

4
Marlin/src/module/planner.cpp

@ -2311,7 +2311,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
t = neg * junction_cos_theta;
// If angle is greater than 135 degrees (octagon), find speed for approximate arc
if (t < -0.7071067812f) {
if (t > 0.7071067812f) {
#if ENABLED(JD_USE_MATH_ACOS)
@ -2358,7 +2358,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
4.85301876f, 6.77019119f, 9.50873947f, 13.4009094f, 18.9188652f,
26.7320709f, 37.7884521f, 53.4292908f, 75.5522461f, 0.0f };
const int16_t idx = (t == 0.0f) ? 0 : __builtin_clz(int16_t((1.0f - t) * jd_lut_tll)) - jd_lut_tll0;
const int16_t idx = (t == 0.0f) ? 0 : __builtin_clz(uint16_t((1.0f - t) * jd_lut_tll)) - jd_lut_tll0;
float junction_theta = t * pgm_read_float(&jd_lut_k[idx]) + pgm_read_float(&jd_lut_b[idx]);
if (neg > 0) junction_theta = RADIANS(180) - junction_theta;

Loading…
Cancel
Save