HAL_PX4: fixed use of FMU servo pins as digital inputs

these pins can be PWM output or digital input or digital output
This commit is contained in:
Andrew Tridgell 2014-05-25 21:26:34 +10:00
parent 2d9e9d9bc3
commit 37c50d9587

View File

@ -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;
}