Browse Source

HAL_PX4: fixed use of FMU servo pins as digital inputs

these pins can be PWM output or digital input or digital output
mission-4.1.18
Andrew Tridgell 11 years ago
parent
commit
37c50d9587
  1. 5
      libraries/AP_HAL_PX4/GPIO.cpp

5
libraries/AP_HAL_PX4/GPIO.cpp

@ -76,6 +76,11 @@ void PX4GPIO::pinMode(uint8_t pin, uint8_t output) @@ -76,6 +76,11 @@ void PX4GPIO::pinMode(uint8_t pin, uint8_t output)
int8_t PX4GPIO::analogPinToDigitalPin(uint8_t pin)
{
switch (pin) {
case PX4_GPIO_FMU_SERVO_PIN(0) ... PX4_GPIO_FMU_SERVO_PIN(5):
// the only pins that can be mapped are the FMU servo rail pins */
return pin;
}
return -1;
}

Loading…
Cancel
Save