Setup speed control
This commit is contained in:
		
							parent
							
								
									4adeec5219
								
							
						
					
					
						commit
						4dcfb1ea07
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue