From f5ded7b5f3e87e40eb08ce0158af59a198706ae0 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 12 Aug 2024 19:09:26 +1000 Subject: [PATCH 1/2] AP_Networking: correct compilation when network port registering disabled ports doesn't exist if this condition is false --- libraries/AP_Networking/AP_Networking.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_Networking/AP_Networking.cpp b/libraries/AP_Networking/AP_Networking.cpp index 1d2edb1c98aa0..c00ef4a713ec2 100644 --- a/libraries/AP_Networking/AP_Networking.cpp +++ b/libraries/AP_Networking/AP_Networking.cpp @@ -198,8 +198,10 @@ void AP_Networking::init() start_tests(); #endif +#if AP_NETWORKING_REGISTER_PORT_ENABLED // init network mapped serialmanager ports ports_init(); +#endif } /* From 8f7f01f7012efcb38a95008a1218127bfc379292 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 12 Aug 2024 19:09:26 +1000 Subject: [PATCH 2/2] 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 4a9a3d2339046..562ac606075a4 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