mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
[IST8310] Respect address CLI argument
This commit is contained in:
parent
579a1e48e9
commit
2280e94a47
@ -90,9 +90,10 @@ int IST8310::probe()
|
||||
// addition, the I2C address is not always correct, sometimes it boots with
|
||||
// 0x0C rather than 0x0E.
|
||||
const auto start_time = hrt_absolute_time();
|
||||
const uint8_t start_addr = get_device_address();
|
||||
|
||||
while (hrt_elapsed_time(&start_time) < 50_ms) {
|
||||
set_device_address(I2C_ADDRESS_DEFAULT);
|
||||
set_device_address(start_addr);
|
||||
const int WAI = RegisterRead(Register::WAI);
|
||||
|
||||
if (WAI == Device_ID) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user