From d5ffc8a863c7925adfd1bfb7418d29c64eb4ae94 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 26 Jul 2016 15:47:25 +1000 Subject: [PATCH] AP_RangeFinder: define 3_ADDR when we have three rangefinders Without this patch this field would only be defined when 4 rangefinders were specified --- libraries/AP_RangeFinder/RangeFinder.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libraries/AP_RangeFinder/RangeFinder.cpp b/libraries/AP_RangeFinder/RangeFinder.cpp index 86cbfdbe84..d23bea0d1b 100644 --- a/libraries/AP_RangeFinder/RangeFinder.cpp +++ b/libraries/AP_RangeFinder/RangeFinder.cpp @@ -227,6 +227,7 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = { #endif #if RANGEFINDER_MAX_INSTANCES > 2 + // @Param: 3_TYPE // @DisplayName: Second Rangefinder type // @Description: What type of rangefinder device that is connected @@ -300,17 +301,19 @@ const AP_Param::GroupInfo RangeFinder::var_info[] = { // @Increment: 1 // @User: Advanced AP_GROUPINFO("3_GNDCLEAR", 35, RangeFinder, _ground_clearance_cm[2], RANGEFINDER_GROUND_CLEARANCE_CM_DEFAULT), -#endif -#if RANGEFINDER_MAX_INSTANCES > 3 // @Param: 3_ADDR - // @DisplayName: Bus address of 2nd rangefinder + // @DisplayName: Bus address of third rangefinder // @Description: This sets the bus address of the sensor, where applicable. Used for the LightWare I2C sensor to allow for multiple sensors on different addresses. A value of 0 disables the sensor. // @Range: 0 127 // @Increment: 1 // @User: Advanced AP_GROUPINFO("3_ADDR", 36, RangeFinder, _address[2], 0), - + +#endif + +#if RANGEFINDER_MAX_INSTANCES > 3 + // @Param: 4_TYPE // @DisplayName: Second Rangefinder type // @Description: What type of rangefinder device that is connected