summaryrefslogtreecommitdiff
path: root/libraries/MultiLCD/MultiLCD.cpp
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2013-07-24 01:01:23 +0800
committerStanley Huang <stanleyhuangyc@gmail.com>2013-07-24 01:01:23 +0800
commit9dd48e5285ed65cae13ca8e9157e0503a8d58e88 (patch)
tree1ee1bf813c3f5c565dc23e6421caea4f46a1f4ec /libraries/MultiLCD/MultiLCD.cpp
parent9e44fd48ee50e3cf39283f16c532e7089e8117dc (diff)
download2021-arduino-obd-9dd48e5285ed65cae13ca8e9157e0503a8d58e88.tar.gz
2021-arduino-obd-9dd48e5285ed65cae13ca8e9157e0503a8d58e88.tar.bz2
2021-arduino-obd-9dd48e5285ed65cae13ca8e9157e0503a8d58e88.zip
update MultiLCD library
Diffstat (limited to 'libraries/MultiLCD/MultiLCD.cpp')
-rw-r--r--libraries/MultiLCD/MultiLCD.cpp6
1 files changed, 3 insertions, 3 deletions
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]));
}