clonified, should be faster too bc we're avoiding copying
This commit is contained in:
@@ -20,11 +20,11 @@ class LCDDisplay {
|
||||
void close();
|
||||
|
||||
// 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);
|
||||
void writeStr(const std::string& str);
|
||||
void writeStr(uint8_t row, uint8_t col, const std::string& str);
|
||||
|
||||
public:
|
||||
explicit LCDDisplay(std::string dev, uint32_t baud = 0010002); // from termios-baud.h, B115200
|
||||
explicit LCDDisplay(const std::string& dev, uint32_t baud = 0010002); // from termios-baud.h, B115200
|
||||
~LCDDisplay();
|
||||
|
||||
void clear();
|
||||
@@ -34,13 +34,13 @@ class LCDDisplay {
|
||||
void setCursor(uint8_t row, uint8_t col);
|
||||
void setCustomChar(uint8_t index, std::array<uint8_t, 8> cchar);
|
||||
|
||||
void writeBuf(uint8_t row, uint8_t col, std::string str);
|
||||
void writeBuf(uint8_t row, uint8_t col, const std::string& str);
|
||||
void clearBuf();
|
||||
void flushBuf();
|
||||
char bar(uint8_t char_id, double value);
|
||||
|
||||
// returns custom char no. c, small enough to define in header
|
||||
static constexpr char cc(const uint8_t c) { return c % 8; }
|
||||
static constexpr char cc(const uint8_t c) { return static_cast<char>(c % 8); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user