mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 17:44:08 +08:00
unconfigure GPIO_PPM_IN before reconfiguring
This commit is contained in:
parent
2cf5fb8fb0
commit
192c2a32c8
@ -901,6 +901,7 @@ PX4FMU::cycle()
|
||||
// assume SBUS input
|
||||
sbus_config(_rcs_fd, false);
|
||||
// disable CPPM input by mapping it away from the timer capture input
|
||||
stm32_unconfiggpio(GPIO_PPM_IN);
|
||||
stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK));
|
||||
#endif
|
||||
|
||||
@ -1331,6 +1332,7 @@ PX4FMU::cycle()
|
||||
|
||||
} else {
|
||||
// disable CPPM input by mapping it away from the timer capture input
|
||||
stm32_unconfiggpio(GPIO_PPM_IN);
|
||||
stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK));
|
||||
// Scan the next protocol
|
||||
set_rc_scan_state(RC_SCAN_SBUS);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user