mirror of https://github.com/ArduPilot/ardupilot
AP_Rangefinder: preserve new address
This commit is contained in:
parent
599cd15c7b
commit
ce8405b7a4
|
@ -84,6 +84,11 @@ bool AP_RangeFinder_VL53L1X::check_id(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AP_RangeFinder_VL53L1X::reset(void) {
|
bool AP_RangeFinder_VL53L1X::reset(void) {
|
||||||
|
if (dev->get_bus_id()!=0x29) {
|
||||||
|
// if sensor is on a different port than the default do not reset sensor otherwise we will lose the addess.
|
||||||
|
// we assume it is already confirgured.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!write_register(SOFT_RESET, 0x00)) {
|
if (!write_register(SOFT_RESET, 0x00)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue