From 931bae5b88e42b8a46481f6a3d42284cad8e946a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Dec 2023 13:21:11 +1100 Subject: [PATCH] AP_HAL_Linux: use SocketAPM_native --- libraries/AP_HAL_Linux/ConsoleDevice.h | 2 +- libraries/AP_HAL_Linux/RCInput_SoloLink.h | 6 +++++- libraries/AP_HAL_Linux/RCInput_UDP.h | 2 +- libraries/AP_HAL_Linux/TCPServerDevice.h | 6 +++++- libraries/AP_HAL_Linux/UARTDevice.h | 2 +- libraries/AP_HAL_Linux/UDPDevice.h | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libraries/AP_HAL_Linux/ConsoleDevice.h b/libraries/AP_HAL_Linux/ConsoleDevice.h index 7782434a3c..940c6fc274 100644 --- a/libraries/AP_HAL_Linux/ConsoleDevice.h +++ b/libraries/AP_HAL_Linux/ConsoleDevice.h @@ -1,7 +1,7 @@ #pragma once #include "SerialDevice.h" -#include +#include class ConsoleDevice: public SerialDevice { public: diff --git a/libraries/AP_HAL_Linux/RCInput_SoloLink.h b/libraries/AP_HAL_Linux/RCInput_SoloLink.h index 29538a30ab..d56ae8f277 100644 --- a/libraries/AP_HAL_Linux/RCInput_SoloLink.h +++ b/libraries/AP_HAL_Linux/RCInput_SoloLink.h @@ -18,11 +18,15 @@ #include -#include +#include #include #include "RCInput.h" +#ifndef AP_SOCKET_NATIVE_ENABLED +#error "need native" +#endif + namespace Linux { class RCInput_SoloLink : public RCInput diff --git a/libraries/AP_HAL_Linux/RCInput_UDP.h b/libraries/AP_HAL_Linux/RCInput_UDP.h index 2154a26a65..0431a2be7f 100644 --- a/libraries/AP_HAL_Linux/RCInput_UDP.h +++ b/libraries/AP_HAL_Linux/RCInput_UDP.h @@ -1,7 +1,7 @@ #pragma once #include "RCInput.h" -#include +#include #include "RCInput_UDP_Protocol.h" #define RCINPUT_UDP_DEF_PORT 777 diff --git a/libraries/AP_HAL_Linux/TCPServerDevice.h b/libraries/AP_HAL_Linux/TCPServerDevice.h index 757e336df2..0a268145a8 100644 --- a/libraries/AP_HAL_Linux/TCPServerDevice.h +++ b/libraries/AP_HAL_Linux/TCPServerDevice.h @@ -1,7 +1,11 @@ #pragma once +#include #include "SerialDevice.h" -#include + +#ifndef AP_SOCKET_NATIVE_ENABLED +#error "need native" +#endif class TCPServerDevice: public SerialDevice { public: diff --git a/libraries/AP_HAL_Linux/UARTDevice.h b/libraries/AP_HAL_Linux/UARTDevice.h index b6dcae6ed6..582089d470 100644 --- a/libraries/AP_HAL_Linux/UARTDevice.h +++ b/libraries/AP_HAL_Linux/UARTDevice.h @@ -1,7 +1,7 @@ #pragma once #include "SerialDevice.h" -#include +#include class UARTDevice: public SerialDevice { public: diff --git a/libraries/AP_HAL_Linux/UDPDevice.h b/libraries/AP_HAL_Linux/UDPDevice.h index a51e2ddc5b..4d3ad4d6f7 100644 --- a/libraries/AP_HAL_Linux/UDPDevice.h +++ b/libraries/AP_HAL_Linux/UDPDevice.h @@ -1,7 +1,7 @@ #pragma once +#include #include "SerialDevice.h" -#include class UDPDevice: public SerialDevice { public: