mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 09:39:06 +08:00
S.BUS: Fix compile error for single wire IOCTL
This commit is contained in:
parent
87add55620
commit
1871a61676
@ -44,6 +44,10 @@
|
||||
#include <termios.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef TIOCSSINGLEWIRE
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include "sbus.h"
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@ -149,7 +153,7 @@ sbus_config(int sbus_fd, bool singlewire)
|
||||
if (singlewire) {
|
||||
/* only defined in configs capable of IOCTL */
|
||||
#ifdef TIOCSSINGLEWIRE
|
||||
ioctl(uart, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED);
|
||||
ioctl(sbus_fd, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user