cleanup lcddisplay a lil

This commit is contained in:
Drath
2025-10-29 18:29:13 +01:00
parent 871edb642e
commit 25cee5f669
3 changed files with 44 additions and 36 deletions

View File

@@ -15,12 +15,15 @@ class LCDDisplay {
char writebuf[LCD_LINES * LCD_COLS + 8]; // 4x40 chars + 2x4 setcursor commands
static constexpr bool dualDisp = (LCD_LINES * LCD_COLS > 80); // is it dual display device or not, evauluated from the size at compile time
void writeLines(std::array<std::string, 4> lines); // do not use
// we avoid using these, use buffer (even if these are faster for small writes, perhaps a rewrite is in order)
void writeStr(std::string str);
void writeStr(uint8_t row, uint8_t col, std::string str);
public:
LCDDisplay(std::string dev, uint32_t baud = 0010002); // from termios-baud.h, B115200
~LCDDisplay();
void _open();
void _close();
void open();
void close();
void clear();
void setContrast(uint8_t contrast);
@@ -29,8 +32,6 @@ class LCDDisplay {
void setCursor(uint8_t row, uint8_t col);
void setCustomChar(uint8_t index, std::array<uint8_t, 8> cchar);
void writeStr(std::string str);
void writeStr(uint8_t row, uint8_t col, std::string str);
void writeBuf(uint8_t row, uint8_t col, std::string str);
void clearBuf();
void flushBuf();
@@ -41,4 +42,4 @@ class LCDDisplay {
char bar(uint8_t char_id, double value);
};
#endif
#endif