mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
S.BUS: Fix compile error for single wire IOCTL
This commit is contained in:
+5
-1
@@ -44,6 +44,10 @@
|
|||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef TIOCSSINGLEWIRE
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sbus.h"
|
#include "sbus.h"
|
||||||
#include <drivers/drv_hrt.h>
|
#include <drivers/drv_hrt.h>
|
||||||
|
|
||||||
@@ -149,7 +153,7 @@ sbus_config(int sbus_fd, bool singlewire)
|
|||||||
if (singlewire) {
|
if (singlewire) {
|
||||||
/* only defined in configs capable of IOCTL */
|
/* only defined in configs capable of IOCTL */
|
||||||
#ifdef TIOCSSINGLEWIRE
|
#ifdef TIOCSSINGLEWIRE
|
||||||
ioctl(uart, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED);
|
ioctl(sbus_fd, TIOCSSINGLEWIRE, SER_SINGLEWIRE_ENABLED);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user