Macros to eliminate 'f + 0.0' (#21568)

This commit is contained in:
Ramiro Polla
2021-04-09 04:03:34 +02:00
committed by GitHub
parent 19320a1f8f
commit 1a2cbe100c
10 changed files with 25 additions and 18 deletions

View File

@ -2997,7 +2997,7 @@ void Planner::set_e_position_mm(const_float_t e) {
const uint8_t axis_index = E_AXIS_N(active_extruder);
TERN_(DISTINCT_E_FACTORS, last_extruder = active_extruder);
const float e_new = e - TERN0(FWRETRACT, fwretract.current_retract[active_extruder]);
const float e_new = DIFF_TERN(FWRETRACT, e, fwretract.current_retract[active_extruder]);
position.e = LROUND(settings.axis_steps_per_mm[axis_index] * e_new);
TERN_(HAS_POSITION_FLOAT, position_float.e = e_new);
TERN_(IS_KINEMATIC, position_cart.e = e);