X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fstepper.c;h=6614623d409b676b6ea3d8731bf90c11bbd4e4de;hb=4cc44c9888a0336b9d01121ec0b7ad95f4a76195;hp=57ac7fc4057a5b010ca9d25e38f147790bcef230;hpb=57b276690a570cd37b2f2448249e1558cafbd369;p=bertos.git diff --git a/bertos/drv/stepper.c b/bertos/drv/stepper.c index 57ac7fc4..6614623d 100644 --- a/bertos/drv/stepper.c +++ b/bertos/drv/stepper.c @@ -11,7 +11,7 @@ * * \author Francesco Michelini * \author Giovanni Bajo - * \author Bernardo Innocenti + * \author Bernie Innocenti * \author Simone Zinanni * \author Daniele Basile */ @@ -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