mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -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;
|
break;
|
||||||
case Type::BenewakeTFminiPlus: {
|
case Type::BenewakeTFminiPlus: {
|
||||||
#if AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED
|
#if AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED
|
||||||
uint8_t addr = TFMINI_ADDR_DEFAULT;
|
uint8_t addr = TFMINIPLUS_ADDR_DEFAULT;
|
||||||
if (params[instance].address != 0) {
|
if (params[instance].address != 0) {
|
||||||
addr = params[instance].address;
|
addr = params[instance].address;
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
#if AP_RANGEFINDER_BENEWAKE_TFMINI_ENABLED
|
#if AP_RANGEFINDER_BENEWAKE_TFMINI_ENABLED
|
||||||
|
|
||||||
#define TFMINI_ADDR_DEFAULT 0x10 // TFMini default device id
|
|
||||||
|
|
||||||
class AP_RangeFinder_Benewake_TFMini : public AP_RangeFinder_Benewake
|
class AP_RangeFinder_Benewake_TFMini : public AP_RangeFinder_Benewake
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#if AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED
|
#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/utility/sparse-endian.h>
|
||||||
#include <AP_HAL/I2CDevice.h>
|
#include <AP_HAL/I2CDevice.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user