AP_HAL_SITL: If HAL_CAN_WITH_SOCKETCAN is undefined, treat it as NONE

This commit is contained in:
muramura 2024-07-17 07:20:26 +09:00 committed by Andrew Tridgell
parent edaddc0431
commit 7731fc09e2
1 changed files with 2 additions and 2 deletions

View File

@ -219,11 +219,11 @@ bool CANIface::init(const uint32_t bitrate, const OperatingMode mode)
case SITL::SIM::CANTransport::MulticastUDP: case SITL::SIM::CANTransport::MulticastUDP:
transport = NEW_NOTHROW CAN_Multicast(); transport = NEW_NOTHROW CAN_Multicast();
break; break;
case SITL::SIM::CANTransport::SocketCAN:
#if HAL_CAN_WITH_SOCKETCAN #if HAL_CAN_WITH_SOCKETCAN
case SITL::SIM::CANTransport::SocketCAN:
transport = NEW_NOTHROW CAN_SocketCAN(); transport = NEW_NOTHROW CAN_SocketCAN();
#endif
break; break;
#endif
case SITL::SIM::CANTransport::None: case SITL::SIM::CANTransport::None:
default: // if user supplies an invalid value for the parameter default: // if user supplies an invalid value for the parameter
transport = nullptr; transport = nullptr;