AP_Vehicle: correct compilation when network port registering disabled

the ports member doesn't exist in this case
This commit is contained in:
Peter Barker 2024-08-12 19:09:26 +10:00 committed by Andrew Tridgell
parent f32f3beceb
commit 8c6a427107
1 changed files with 2 additions and 0 deletions

View File

@ -223,6 +223,7 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = {
are too deep in the parameter tree are too deep in the parameter tree
*/ */
#if AP_NETWORKING_REGISTER_PORT_ENABLED
#if AP_NETWORKING_NUM_PORTS > 0 #if AP_NETWORKING_NUM_PORTS > 0
// @Group: NET_P1_ // @Group: NET_P1_
// @Path: ../AP_Networking/AP_Networking_port.cpp // @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 // @Path: ../AP_Networking/AP_Networking_port.cpp
AP_SUBGROUPINFO(networking.ports[3], "NET_P4_", 25, AP_Vehicle, AP_Networking::Port), AP_SUBGROUPINFO(networking.ports[3], "NET_P4_", 25, AP_Vehicle, AP_Networking::Port),
#endif #endif
#endif // AP_NETWORKING_REGISTER_PORT_ENABLED
#endif // AP_NETWORKING_ENABLED #endif // AP_NETWORKING_ENABLED
#if AP_FILTER_ENABLED #if AP_FILTER_ENABLED