From cbf549b1eb43729625fefe70cb29accbaddf04c0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 15 Jul 2021 13:13:03 +1000 Subject: [PATCH] AP_Airspeed: fixed display of ARSPD_DEVID when ARSPD2_TYPE=0 --- libraries/AP_Airspeed/AP_Airspeed.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libraries/AP_Airspeed/AP_Airspeed.cpp b/libraries/AP_Airspeed/AP_Airspeed.cpp index 930fc09c8d..78039c64b2 100644 --- a/libraries/AP_Airspeed/AP_Airspeed.cpp +++ b/libraries/AP_Airspeed/AP_Airspeed.cpp @@ -88,6 +88,13 @@ const AP_Param::GroupInfo AP_Airspeed::var_info[] = { // @User: Standard AP_GROUPINFO_FLAGS("_TYPE", 0, AP_Airspeed, param[0].type, ARSPD_DEFAULT_TYPE, AP_PARAM_FLAG_ENABLE), + // @Param: _DEVID + // @DisplayName: Airspeed ID + // @Description: Airspeed sensor ID, taking into account its type, bus and instance + // @ReadOnly: True + // @User: Advanced + AP_GROUPINFO_FLAGS("_DEVID", 24, AP_Airspeed, param[0].bus_id, 0, AP_PARAM_FLAG_INTERNAL_USE_ONLY), + #ifndef HAL_BUILD_AP_PERIPH // @Param: _USE // @DisplayName: Airspeed use @@ -253,16 +260,6 @@ const AP_Param::GroupInfo AP_Airspeed::var_info[] = { // @Values: 0:Bus0(internal),1:Bus1(external),2:Bus2(auxillary) // @User: Advanced AP_GROUPINFO("2_BUS", 20, AP_Airspeed, param[1].bus, 1), -#endif // AIRSPEED_MAX_SENSORS - - // Note that 21, 22 and 23 are used above by the _OPTIONS, _WIND_MAX and _WIND_WARN parameters. Do not use them!! - - // @Param: _DEVID - // @DisplayName: Airspeed ID - // @Description: Airspeed sensor ID, taking into account its type, bus and instance - // @ReadOnly: True - // @User: Advanced - AP_GROUPINFO_FLAGS("_DEVID", 24, AP_Airspeed, param[0].bus_id, 0, AP_PARAM_FLAG_INTERNAL_USE_ONLY), #if AIRSPEED_MAX_SENSORS > 1 // @Param: 2_DEVID @@ -273,6 +270,9 @@ const AP_Param::GroupInfo AP_Airspeed::var_info[] = { AP_GROUPINFO_FLAGS("2_DEVID", 25, AP_Airspeed, param[1].bus_id, 0, AP_PARAM_FLAG_INTERNAL_USE_ONLY), #endif +#endif // AIRSPEED_MAX_SENSORS + + // Note that 21, 22 and 23 are used above by the _OPTIONS, _WIND_MAX and _WIND_WARN parameters. Do not use them!! AP_GROUPEND };