mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 03:13:33 +08:00
Fix the DSM (spektrum) protocol decoder, and add some format auto-detection to it.
This commit is contained in:
+2
-5
@@ -112,9 +112,7 @@ serial_rx_init(unsigned serial_mode)
|
||||
tcgetattr(rx_fd, &t);
|
||||
|
||||
switch (serial_mode) {
|
||||
case RX_MODE_DSM_10BIT:
|
||||
case RX_MODE_DSM_11BIT:
|
||||
|
||||
case RX_MODE_DSM:
|
||||
/* 115200, no parity, one stop bit */
|
||||
cfsetspeed(&t, 115200);
|
||||
t.c_cflag &= ~(CSTOPB | PARENB);
|
||||
@@ -163,8 +161,7 @@ comms_check(void)
|
||||
*/
|
||||
if ((pollcount > 1) && (pollfds[1].revents & POLLIN)) {
|
||||
switch (system_state.serial_rx_mode) {
|
||||
case RX_MODE_DSM_10BIT:
|
||||
case RX_MODE_DSM_11BIT:
|
||||
case RX_MODE_DSM:
|
||||
dsm_input(rx_fd);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user