Skip to content

Commit

Permalink
AP_Vehicle: correct compilation when network port registering disabled
Browse files Browse the repository at this point in the history
the ports member doesn't exist in this case
  • Loading branch information
peterbarker authored and tridge committed Aug 13, 2024
1 parent f32f3be commit 8c6a427
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Vehicle/AP_Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8c6a427

Please sign in to comment.