forked from Archive/PX4-Autopilot
implement Spektrum bind function for Pixracer R14 (#4887)
This commit is contained in:
parent
024a86c309
commit
40a7bd009f
|
@ -268,7 +268,7 @@ __BEGIN_DECLS
|
||||||
#define SPEKTRUM_RX_AS_UART() px4_arch_configgpio(GPIO_USART1_RX)
|
#define SPEKTRUM_RX_AS_UART() px4_arch_configgpio(GPIO_USART1_RX)
|
||||||
|
|
||||||
// FMUv4 has a separate GPIO for serial RC output
|
// FMUv4 has a separate GPIO for serial RC output
|
||||||
#define GPIO_RC_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN6)
|
#define GPIO_RC_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN0)
|
||||||
#define SPEKTRUM_RX_AS_GPIO() px4_arch_configgpio(GPIO_RC_OUT)
|
#define SPEKTRUM_RX_AS_GPIO() px4_arch_configgpio(GPIO_RC_OUT)
|
||||||
#define SPEKTRUM_RX_HIGH(_s) px4_arch_gpiowrite(GPIO_RC_OUT, (_s))
|
#define SPEKTRUM_RX_HIGH(_s) px4_arch_gpiowrite(GPIO_RC_OUT, (_s))
|
||||||
|
|
||||||
|
|
|
@ -1989,9 +1989,9 @@ PX4FMU::pwm_ioctl(file *filp, int cmd, unsigned long arg)
|
||||||
arg == DSMX8_BIND_PULSES) {
|
arg == DSMX8_BIND_PULSES) {
|
||||||
|
|
||||||
dsm_bind(DSM_CMD_BIND_POWER_DOWN, 0);
|
dsm_bind(DSM_CMD_BIND_POWER_DOWN, 0);
|
||||||
usleep(500000);
|
|
||||||
|
|
||||||
dsm_bind(DSM_CMD_BIND_SET_RX_OUT, 0);
|
dsm_bind(DSM_CMD_BIND_SET_RX_OUT, 0);
|
||||||
|
usleep(500000);
|
||||||
|
|
||||||
dsm_bind(DSM_CMD_BIND_POWER_UP, 0);
|
dsm_bind(DSM_CMD_BIND_POWER_UP, 0);
|
||||||
usleep(72000);
|
usleep(72000);
|
||||||
|
|
Loading…
Reference in New Issue