mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_RangeFinder: correct creation/use of TFMINI_ADDR_DEFAULT
Named incorrectly and defined in wrong file...
This commit is contained in:
parent
05131853d8
commit
deba0b712b
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
#if AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED
|
||||
|
||||
#define TFMINIPLUS_ADDR_DEFAULT 0x10 // TFMini default device id
|
||||
|
||||
#include <AP_HAL/utility/sparse-endian.h>
|
||||
#include <AP_HAL/I2CDevice.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user