From 6bf3dea5e7ced24aa35ae3f1ec58179396dfb233 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 21 Jun 2018 13:09:53 +1000 Subject: [PATCH] AP_Notify: use I2C bus masks --- libraries/AP_Notify/Display.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libraries/AP_Notify/Display.cpp b/libraries/AP_Notify/Display.cpp index ff2d627c1d..4fdb522dde 100644 --- a/libraries/AP_Notify/Display.cpp +++ b/libraries/AP_Notify/Display.cpp @@ -314,9 +314,6 @@ static const uint8_t _font[] = { #endif }; -// probe first 3 busses: -static const uint8_t I2C_BUS_PROBE_MASK = 0xf; - bool Display::init(void) { // exit immediately if already initialised @@ -325,10 +322,7 @@ bool Display::init(void) } // initialise driver - for(uint8_t i=0; i<8 && _driver == nullptr; i++) { - if (! (I2C_BUS_PROBE_MASK & (1<_display_type) { case DISPLAY_SSD1306: { _driver = Display_SSD1306_I2C::probe(std::move(hal.i2c_mgr->get_device(i, NOTIFY_DISPLAY_I2C_ADDR)));