summaryrefslogtreecommitdiff
path: root/libraries/MultiLCD
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2014-10-30 23:45:44 +1100
committerStanley Huang <stanleyhuangyc@gmail.com>2014-10-30 23:45:44 +1100
commitd646498e8bfe66c2785445bf0626949170ae2f79 (patch)
tree416fd9132d7b64cec53d4477f6d80fb068768b7a /libraries/MultiLCD
parent3d62ec51d2952518985cf28af40e6346f1d0cf3f (diff)
download2021-arduino-obd-d646498e8bfe66c2785445bf0626949170ae2f79.tar.gz
2021-arduino-obd-d646498e8bfe66c2785445bf0626949170ae2f79.tar.bz2
2021-arduino-obd-d646498e8bfe66c2785445bf0626949170ae2f79.zip
Remove reference to 8x8 digit font
Diffstat (limited to 'libraries/MultiLCD')
-rw-r--r--libraries/MultiLCD/ILI9325D.cpp23
-rw-r--r--libraries/MultiLCD/SSD1289.cpp26
2 files changed, 6 insertions, 43 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) : ' ');
}
}
diff --git a/libraries/MultiLCD/SSD1289.cpp b/libraries/MultiLCD/SSD1289.cpp
index 0f57264..d5c2675 100644
--- a/libraries/MultiLCD/SSD1289.cpp
+++ b/libraries/MultiLCD/SSD1289.cpp
@@ -237,29 +237,7 @@ size_t LCD_SSD1289::write(uint8_t c)
void LCD_SSD1289::writeDigit(byte n)
{
Enable();
- if (m_font == FONT_SIZE_SMALL) {
- setXY(m_x, m_y, m_x + 7, m_y + 7);
- 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) {
- if (d & 1)
- setPixel(fch, fcl);
- else
- setPixel(bch, bcl);
- }
- } while (i--);
-
- } else {
- clearPixels(8 * 8);
- }
- m_x += 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_y, m_x + 15, m_y + 15);
if (n <= 9) {
byte pgm_buffer[32];
@@ -316,6 +294,8 @@ void LCD_SSD1289::writeDigit(byte n)
clearPixels(16 * 24);
}
m_x += 18;
+ } else {
+ write(n <= 9 ? ('0' + n) : ' ');
}
Disable();
}