Fix type warning.
[bertos.git] / bertos / drv / stepper.c
index 57ac7fc4057a5b010ca9d25e38f147790bcef230..21667866e923b0d9dd01163ad9aafcf719ea851e 100644 (file)
@@ -313,7 +313,7 @@ static enum StepperState FAST_FUNC FSM_run(struct Stepper *motor)
                //motor->rampValue = 0;
                //motor->rampClock = motor->rampValue = motor->ramp->clocksMaxWL;
 
-       else if (distance <= motor->rampStep)
+       else if (distance <= (uint16_t)motor->rampStep)
                stepper_decel(motor);
 
        // check whether the velocity must be changed