add some return values to some shit so it shuts down elegantly on crash
This commit is contained in:
@@ -11,11 +11,12 @@
|
||||
class LCDDisplay {
|
||||
private:
|
||||
int _lcd = -1;
|
||||
uint32_t _baud = 0;
|
||||
std::string _dev;
|
||||
std::array<char, LCD_LINES * LCD_COLS + 8> writebuf{}; // 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 open(bool reopen = false);
|
||||
int open(bool reopen = false);
|
||||
void write(const uint8_t* cmdbuf, uint8_t len);
|
||||
void close();
|
||||
|
||||
@@ -27,6 +28,7 @@ class LCDDisplay {
|
||||
explicit LCDDisplay(const std::string& dev, uint32_t baud = 0010002); // from termios-baud.h, B115200
|
||||
~LCDDisplay();
|
||||
|
||||
int Init();
|
||||
void clear();
|
||||
void setContrast(uint8_t contrast);
|
||||
void setBacklight(bool enabled);
|
||||
|
||||
Reference in New Issue
Block a user