needs cleanup still
This commit is contained in:
4
main.cpp
4
main.cpp
@@ -148,8 +148,8 @@ void display_thread(sensors_t *s, std::stop_token st) {
|
||||
lcd.writeBuf(2, 10, pad(pNum(s->hass_state) + "W", 4));
|
||||
lcd.writeBuf(2, 15, pad("h:" + pBytes(s->home.free), 8));
|
||||
|
||||
lcd.writeBuf(2, 25, pad(s->gpu.fan_speed + "R", 5));
|
||||
std::println("{}", s->gpu.fan_speed);
|
||||
// lcd.writeBuf(2, 25, pad(s->gpu.fan_speed + "R", 5));
|
||||
// std::println("{}", s->gpu.fan_speed);
|
||||
lcd.writeBuf(2, 31, pad(std::to_string(s->gpu.power_avg) + "/" + std::to_string(s->gpu.power_cap) + "W", 9));
|
||||
|
||||
lcd.writeBuf(3, 0, pad(pNum(s->cpu.vcore, 3) + "V", 7, true));
|
||||
|
||||
@@ -86,7 +86,7 @@ void LCDDisplay::writeBuf(uint8_t row, uint8_t col, std::string str) {
|
||||
|
||||
/* hyper optimized buffer flush command, writes whole disp with a single write */
|
||||
void LCDDisplay::flushBuffer() {
|
||||
char writebuf[168]; // 4x40 chars + 2x4 setcursor commands + 1 null terminator
|
||||
char writebuf[168]; // 4x40 chars + 2x4 setcursor commands
|
||||
uint8_t setDisp[] = {254, 71, 1}; // skeleton set cursor command
|
||||
|
||||
std::memcpy(&writebuf[0], setDisp, 3); // copy template set cursor command
|
||||
|
||||
Reference in New Issue
Block a user