mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
unconfigure GPIO_PPM_IN before reconfiguring
This commit is contained in:
committed by
Julian Oes
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);
|
||||
|
||||
Reference in New Issue
Block a user