diff --git a/libraries/AP_RangeFinder/AP_RangeFinder.cpp b/libraries/AP_RangeFinder/AP_RangeFinder.cpp index 634253fc5f..cc7c283ac4 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder.cpp @@ -432,7 +432,7 @@ void RangeFinder::detect_instance(uint8_t instance, uint8_t& serial_instance) break; case Type::BenewakeTFminiPlus: { #if AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED - uint8_t addr = TFMINI_ADDR_DEFAULT; + uint8_t addr = TFMINIPLUS_ADDR_DEFAULT; if (params[instance].address != 0) { addr = params[instance].address; } diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMini.h b/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMini.h index 901d5f976a..903a625b90 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMini.h +++ b/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMini.h @@ -8,8 +8,6 @@ #if AP_RANGEFINDER_BENEWAKE_TFMINI_ENABLED -#define TFMINI_ADDR_DEFAULT 0x10 // TFMini default device id - class AP_RangeFinder_Benewake_TFMini : public AP_RangeFinder_Benewake { public: diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMiniPlus.h b/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMiniPlus.h index 3074504c92..b3cd7e6a51 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMiniPlus.h +++ b/libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMiniPlus.h @@ -25,6 +25,8 @@ #if AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED +#define TFMINIPLUS_ADDR_DEFAULT 0x10 // TFMini default device id + #include #include