diff options
Diffstat (limited to 'libraries/MultiLCD/ILI9325D.cpp')
-rw-r--r-- | libraries/MultiLCD/ILI9325D.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/libraries/MultiLCD/ILI9325D.cpp b/libraries/MultiLCD/ILI9325D.cpp index 2c791bc..375ad21 100644 --- a/libraries/MultiLCD/ILI9325D.cpp +++ b/libraries/MultiLCD/ILI9325D.cpp @@ -348,26 +348,7 @@ size_t LCD_ILI9325D::write(uint8_t c) void LCD_ILI9325D::writeDigit(byte n) { - if (m_font == FONT_SIZE_SMALL) { - setXY(m_x, m_x + 7, m_y, m_y + 7); - m_y += 8; - if (n <= 9) { - byte pgm_buffer[8]; - memcpy_P(pgm_buffer, &digits8x8[n], 8); - byte i = 7; - do { - unsigned char d = pgm_buffer[i]; - for (byte j = 0; j < 8; j++, d >>= 1) { - WriteData(m_color[d & 1]); - } - } while (i--); - - } else { - clearPixels(8 * 8); - } - } else if (m_font == FONT_SIZE_MEDIUM) { - write(n <= 9 ? ('0' + n) : ' '); - } else if (m_font == FONT_SIZE_LARGE) { + if (m_font == FONT_SIZE_LARGE) { setXY(m_x, m_x + 15, m_y, m_y + 15); m_y += 16; if (n <= 9) { @@ -409,6 +390,8 @@ void LCD_ILI9325D::writeDigit(byte n) } else { clearPixels(16 * 24); } + } else { + write(n <= 9 ? ('0' + n) : ' '); } } |