diff options
author | Jean Cyr <jcyr@dillobits.com> | 2013-08-10 11:22:08 -0400 |
---|---|---|
committer | Jean Cyr <jcyr@dillobits.com> | 2013-08-10 11:22:08 -0400 |
commit | 36679fbb39a57139c03cce85d7d0fbd25383a98a (patch) | |
tree | 7df3154d9de203d066c8a48d69aa420cf50e9362 | |
parent | 7861caf482584afcc19ad235bcbedf26386c05dd (diff) | |
download | px4-firmware-36679fbb39a57139c03cce85d7d0fbd25383a98a.tar.gz px4-firmware-36679fbb39a57139c03cce85d7d0fbd25383a98a.tar.bz2 px4-firmware-36679fbb39a57139c03cce85d7d0fbd25383a98a.zip |
Some DSM satellites are fussier about bind pulse timing
These values work better
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 3 | ||||
-rw-r--r-- | src/modules/px4iofirmware/dsm.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index ae56b70b3..5089ce3c7 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1445,9 +1445,8 @@ PX4IO::ioctl(file * /*filep*/, int cmd, unsigned long arg) io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_DSM, dsm_bind_power_down); usleep(500000); io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_DSM, dsm_bind_set_rx_out); - usleep(1000); io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_DSM, dsm_bind_power_up); - usleep(100000); + usleep(50000); io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_DSM, dsm_bind_send_pulses | (arg << 4)); break; diff --git a/src/modules/px4iofirmware/dsm.c b/src/modules/px4iofirmware/dsm.c index ab6e3fec4..b2c0db425 100644 --- a/src/modules/px4iofirmware/dsm.c +++ b/src/modules/px4iofirmware/dsm.c @@ -125,9 +125,9 @@ dsm_bind(uint16_t cmd, int pulses) case dsm_bind_send_pulses: for (int i = 0; i < pulses; i++) { stm32_gpiowrite(usart1RxAsOutp, false); - up_udelay(50); + up_udelay(25); stm32_gpiowrite(usart1RxAsOutp, true); - up_udelay(50); + up_udelay(25); } break; case dsm_bind_reinit_uart: |