generated from TDD-Templates/cmake_cpputest_template_avr
Setup speed control
This commit is contained in:
parent
4adeec5219
commit
4dcfb1ea07
|
@ -152,9 +152,13 @@ void MotorMoveTo(uint8_t target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The delay ratio controlls the PWM waveforms.
|
// The delay ratio controlls the PWM waveforms.
|
||||||
_delay_ms((double)on_delay);
|
for(uint8_t i = 0; i < on_delay; i++){
|
||||||
|
_delay_us(MOTOR_PULSE);
|
||||||
|
}
|
||||||
MotorCoast();
|
MotorCoast();
|
||||||
_delay_ms((double)off_delay);
|
for(uint8_t i = 0; i < off_delay; i++){
|
||||||
|
_delay_us(MOTOR_PULSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue