From 2280e94a47ad66386022db0eb033271bcbdfb775 Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Wed, 12 Mar 2025 13:14:21 +0100 Subject: [PATCH] [IST8310] Respect address CLI argument --- src/drivers/magnetometer/isentek/ist8310/IST8310.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/magnetometer/isentek/ist8310/IST8310.cpp b/src/drivers/magnetometer/isentek/ist8310/IST8310.cpp index e6c78d77f9..a0cc3fabe1 100644 --- a/src/drivers/magnetometer/isentek/ist8310/IST8310.cpp +++ b/src/drivers/magnetometer/isentek/ist8310/IST8310.cpp @@ -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) {