From 9820b66a9e6edad50938131af05dfa60a139b595 Mon Sep 17 00:00:00 2001 From: Tony Corbett G0WFV Date: Mon, 18 Jul 2016 10:20:31 +0100 Subject: [PATCH] Add I2C device address in startup info If using an LCD connected via I2C, display the configured I2C device address rather than the pins as the host starts up. --- MMDVMHost.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 5d09240..9994823 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -875,7 +875,12 @@ void CMMDVMHost::createDisplay() if (pins.size() == 6U) { LogInfo(" Rows: %u", rows); LogInfo(" Columns: %u", columns); + +#if defined(ADAFRUIT_DISPLAY) || defined(PCF8574_DISPLAY) + LogInfo(" Device Address: %#x", i2cAddress); +#else LogInfo(" Pins: %u,%u,%u,%u,%u,%u", pins.at(0U), pins.at(1U), pins.at(2U), pins.at(3U), pins.at(4U), pins.at(5U)); +#endif LogInfo(" PWM Backlight: %s", pwm ? "yes" : "no"); if (pwm) { @@ -891,6 +896,7 @@ void CMMDVMHost::createDisplay() m_display = new CHD44780(rows, columns, m_callsign, dmrid, pins, i2cAddress, pwm, pwmPin, pwmBright, pwmDim, displayClock, utc, m_duplex); } #endif + #if defined(OLED) } else if (type == "OLED") { unsigned char displayType = m_conf.getOLEDType();