mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 06:14:14 +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 <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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user