mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
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:
parent
2d9e9d9bc3
commit
37c50d9587
@ -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…
Reference in New Issue
Block a user