From 59aab9987e871ec47648c0a3bd707753c41b0c75 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 18 Jul 2018 11:41:08 +1000 Subject: [PATCH] HAL_ChibiOS: account for I2C base in compass masks --- libraries/AP_HAL_ChibiOS/I2CDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp index 87e8f8aab4..3bf5a00fd3 100644 --- a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp +++ b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp @@ -331,7 +331,7 @@ I2CDeviceManager::get_device(uint8_t bus, uint8_t address, */ uint32_t I2CDeviceManager::get_bus_mask(void) const { - return (1U << ARRAY_SIZE_SIMPLE(I2CD)) - 1; + return ((1U << ARRAY_SIZE_SIMPLE(I2CD)) - 1) << HAL_I2C_BUS_BASE; } /*