From 8c6a427107aac7287c344204eb3fa5dbba938f26 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 12 Aug 2024 19:09:26 +1000 Subject: [PATCH] AP_Vehicle: correct compilation when network port registering disabled the ports member doesn't exist in this case --- libraries/AP_Vehicle/AP_Vehicle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index 4a9a3d2339..562ac60607 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -223,6 +223,7 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = { are too deep in the parameter tree */ +#if AP_NETWORKING_REGISTER_PORT_ENABLED #if AP_NETWORKING_NUM_PORTS > 0 // @Group: NET_P1_ // @Path: ../AP_Networking/AP_Networking_port.cpp @@ -246,6 +247,7 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = { // @Path: ../AP_Networking/AP_Networking_port.cpp AP_SUBGROUPINFO(networking.ports[3], "NET_P4_", 25, AP_Vehicle, AP_Networking::Port), #endif +#endif // AP_NETWORKING_REGISTER_PORT_ENABLED #endif // AP_NETWORKING_ENABLED #if AP_FILTER_ENABLED