board/servo/servo.c
/** This function writes angle values to the Z axis for yaw. */
This function writes angle values to the Z axis for yaw.
This function writes angle values to the Z axis for yaw .
void servoWriteZ(signed int angle) {
  if (angle == MIN_ANGLE) {
    OCR1B = MIN_PULSE_WIDTH;
    _delay_ms(10); 
  }
  if (angle == MAX_ANGLE) {
    OCR1B = MAX_PULSE_WIDTH;
    _delay_ms(10);  
  }
  OCR1B = map(angle, MIN_ANGLE, MAX_ANGLE, MIN_PULSE_WIDTH, MAX_PULSE_WIDTH);
  _delay_ms(5);
}
void servoWriteZ ( signed int angle ) { if ( angle == MIN_ANGLE ) { OCR1B = MIN_PULSE_WIDTH ; _delay_ms ( 10 ) ; } if ( angle == MAX_ANGLE ) { OCR1B = MAX_PULSE_WIDTH ; _delay_ms ( 10 ) ; } OCR1B = map ( angle , MIN_ANGLE , MAX_ANGLE , MIN_PULSE_WIDTH , MAX_PULSE_WIDTH ) ; _delay_ms ( 5 ) ; }
This function writes angle values to the Z axis for yaw.
This function writes angle values to the Z axis for yaw .