From 9dd48e5285ed65cae13ca8e9157e0503a8d58e88 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Wed, 24 Jul 2013 01:01:23 +0800 Subject: update MultiLCD library --- libraries/MultiLCD/MultiLCD.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libraries/MultiLCD/MultiLCD.cpp') diff --git a/libraries/MultiLCD/MultiLCD.cpp b/libraries/MultiLCD/MultiLCD.cpp index 1865cc5..dfc3af7 100644 --- a/libraries/MultiLCD/MultiLCD.cpp +++ b/libraries/MultiLCD/MultiLCD.cpp @@ -18,7 +18,7 @@ void LCD_Common::printInt(unsigned int value, char padding) den /= 10; if (v == 0 && padding && den) { if (padding >= i) { - writeDigit(-1); + writeDigit((m_flags & FLAG_PAD_ZERO) ? 0 : -1); } continue; } @@ -36,7 +36,7 @@ void LCD_Common::printLong(unsigned long value, char padding) den /= 10; if (v == 0 && padding && den) { if (padding >= i) { - writeDigit(-1); + writeDigit((m_flags & FLAG_PAD_ZERO) ? 0 : -1); } continue; } @@ -273,10 +273,10 @@ void LCD_SSD1306::writeDigit(byte n) uint8_t twbrbackup = TWBR; TWBR = 18; // upgrade to 400KHz! if (m_font == FONT_SIZE_SMALL) { - n += '0' - 0x21; Wire.beginTransmission(_i2caddr); Wire.write(0x40); if (n <= 9) { + n += '0' - 0x21; for (byte i = 0; i < 5; i++) { Wire.write(pgm_read_byte_near(&font5x8[n][i])); } -- cgit v1.2.3