From 7731fc09e23da3fec6202a020277669d815fca96 Mon Sep 17 00:00:00 2001 From: muramura Date: Wed, 17 Jul 2024 07:20:26 +0900 Subject: [PATCH] AP_HAL_SITL: If HAL_CAN_WITH_SOCKETCAN is undefined, treat it as NONE --- libraries/AP_HAL_SITL/CANSocketIface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_SITL/CANSocketIface.cpp b/libraries/AP_HAL_SITL/CANSocketIface.cpp index e64253b79b..7011c2206b 100644 --- a/libraries/AP_HAL_SITL/CANSocketIface.cpp +++ b/libraries/AP_HAL_SITL/CANSocketIface.cpp @@ -219,11 +219,11 @@ bool CANIface::init(const uint32_t bitrate, const OperatingMode mode) case SITL::SIM::CANTransport::MulticastUDP: transport = NEW_NOTHROW CAN_Multicast(); break; - case SITL::SIM::CANTransport::SocketCAN: #if HAL_CAN_WITH_SOCKETCAN + case SITL::SIM::CANTransport::SocketCAN: transport = NEW_NOTHROW CAN_SocketCAN(); -#endif break; +#endif case SITL::SIM::CANTransport::None: default: // if user supplies an invalid value for the parameter transport = nullptr;