John-Wiliam/Src/service/stepperMotor/service_stepperMotor.c
void service_stepperMotor_update(service_stepperMotor_Stepper* stepper) {
    stepper->amountOfTimeThatStepperDidntMove += TEMPS_ECOULE_EN_MS_ENTRE_CHAQUE_INTERRUPTION;
    
    if(stepper->amountOfTimeThatStepperDidntMove > (1000.0/stepper->velocity)) {
        stepper->amountOfTimeThatStepperDidntMove = 0;
        advanceOneStep(stepper);
    }
}
// step the motor if the function has been called enough
step the motor if the function has been called enough
step the motor if the function has been called enough
void service_stepperMotor_update(service_stepperMotor_Stepper* stepper) {
    stepper->amountOfTimeThatStepperDidntMove += TEMPS_ECOULE_EN_MS_ENTRE_CHAQUE_INTERRUPTION;
    if(stepper->amountOfTimeThatStepperDidntMove > (1000.0/stepper->velocity)) {
        stepper->amountOfTimeThatStepperDidntMove = 0;
        advanceOneStep(stepper);
    }
}
void service_stepperMotor_update ( service_stepperMotor_Stepper * stepper ) { stepper -> amountOfTimeThatStepperDidntMove += TEMPS_ECOULE_EN_MS_ENTRE_CHAQUE_INTERRUPTION ; if ( stepper -> amountOfTimeThatStepperDidntMove > ( 1000.0 / stepper -> velocity ) ) { stepper -> amountOfTimeThatStepperDidntMove = 0 ; advanceOneStep ( stepper ) ; } }
step the motor if the function has been called enough
step the motor if the function has been called enough