Skip to content

Commit 2280e94

Browse files
niklautdagar
authored andcommitted
[IST8310] Respect address CLI argument
1 parent 579a1e4 commit 2280e94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/drivers/magnetometer/isentek/ist8310/IST8310.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ int IST8310::probe()
9090
// addition, the I2C address is not always correct, sometimes it boots with
9191
// 0x0C rather than 0x0E.
9292
const auto start_time = hrt_absolute_time();
93+
const uint8_t start_addr = get_device_address();
9394

9495
while (hrt_elapsed_time(&start_time) < 50_ms) {
95-
set_device_address(I2C_ADDRESS_DEFAULT);
96+
set_device_address(start_addr);
9697
const int WAI = RegisterRead(Register::WAI);
9798

9899
if (WAI == Device_ID) {

0 commit comments

Comments
 (0)