Index: firmware/App/Drivers/RotaryValve.c =================================================================== diff -u -r1500c2a584e9e9ce0ffcd32727c0b9e7cdd141b6 -reef24091316f7c4b5717e72fef7ca06e58fc174a --- firmware/App/Drivers/RotaryValve.c (.../RotaryValve.c) (revision 1500c2a584e9e9ce0ffcd32727c0b9e7cdd141b6) +++ firmware/App/Drivers/RotaryValve.c (.../RotaryValve.c) (revision eef24091316f7c4b5717e72fef7ca06e58fc174a) @@ -133,6 +133,7 @@ { if ( valve < NUM_OF_VALVES ) { + // TODO this line is not needed because the positions are calculated in the homing U16 mag8 = ( ( mag % ROTARY_VALVE_MICROSTEP_FRACTION ) < 4 ? ( mag >> 3 ) << 3 : ( ( mag >> 3 ) << 3 ) + ROTARY_VALVE_MICROSTEP_FRACTION ); // round to multiple of 8 to maximize holding torque S16 chgSteps = (S16)mag8 * ( MOTOR_DIR_REVERSE == dir ? -1 : 1 ); // convert to signed change in position - negative value indicates reverse direction