Setup speed control

This commit is contained in:
jakeg00dwin 2025-02-18 16:41:53 -08:00
parent 4adeec5219
commit 4dcfb1ea07
1 changed files with 6 additions and 2 deletions

View File

@ -152,9 +152,13 @@ void MotorMoveTo(uint8_t target) {
}
// 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();
_delay_ms((double)off_delay);
for(uint8_t i = 0; i < off_delay; i++){
_delay_us(MOTOR_PULSE);
}
}
return;