diff options
Diffstat (limited to 'obdlogger')
-rw-r--r-- | obdlogger/MultiLCD.cpp | 4 | ||||
-rw-r--r-- | obdlogger/MultiLCD.h | 6 | ||||
-rw-r--r-- | obdlogger/PCD8544.h | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/obdlogger/MultiLCD.cpp b/obdlogger/MultiLCD.cpp index c611b14..cff82c2 100644 --- a/obdlogger/MultiLCD.cpp +++ b/obdlogger/MultiLCD.cpp @@ -121,7 +121,7 @@ void LCD_OLED::write(char c) m_column += 8; if (m_column >= 128) { m_column = 0; - m_line++; + m_line += 2; } } @@ -147,7 +147,7 @@ void LCD_OLED::printLarge(const char* s) m_column += 16; if (m_column >= 128) { m_column = 0; - m_line++; + m_line += 2; } s++; } diff --git a/obdlogger/MultiLCD.h b/obdlogger/MultiLCD.h index b8adfeb..5a8f7e3 100644 --- a/obdlogger/MultiLCD.h +++ b/obdlogger/MultiLCD.h @@ -9,6 +9,7 @@ public: virtual void backlight(bool on) {} virtual byte getLines() = 0; virtual byte getCols() = 0; + virtual void changeLine() {} }; class LCD_PCD8544 : public LCD_Common, public PCD8544 @@ -43,6 +44,11 @@ public: m_column = column << 3; m_line = line << 1; } + void changeLine() + { + m_column = 0; + m_line += 2; + } void write(char c); void print(const char* s); void printLarge(const char* s); diff --git a/obdlogger/PCD8544.h b/obdlogger/PCD8544.h index 927ec47..c6e8d43 100644 --- a/obdlogger/PCD8544.h +++ b/obdlogger/PCD8544.h @@ -88,6 +88,11 @@ class PCD8544: public Print { // Draw a chart element at the current cursor position... void drawColumn(unsigned char lines, unsigned char value); + void changeLine() + { + column = 0; + line ++; + } protected: // Current cursor position... unsigned char column; |