mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 08:28:12 +01:00
change lcd clear() to clear the buffer (#1600)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
parent
5e5f8d5f9b
commit
2a12caa955
1 changed files with 3 additions and 6 deletions
|
@ -104,9 +104,7 @@ void HOT LCDDisplay::display() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void LCDDisplay::update() {
|
void LCDDisplay::update() {
|
||||||
for (uint8_t i = 0; i < this->rows_ * this->columns_; i++)
|
this->clear();
|
||||||
this->buffer_[i] = ' ';
|
|
||||||
|
|
||||||
this->call_writer();
|
this->call_writer();
|
||||||
this->display();
|
this->display();
|
||||||
}
|
}
|
||||||
|
@ -149,9 +147,8 @@ void LCDDisplay::printf(const char *format, ...) {
|
||||||
this->print(0, 0, buffer);
|
this->print(0, 0, buffer);
|
||||||
}
|
}
|
||||||
void LCDDisplay::clear() {
|
void LCDDisplay::clear() {
|
||||||
// clear display, also sets DDRAM address to 0 (home)
|
for (uint8_t i = 0; i < this->rows_ * this->columns_; i++)
|
||||||
this->command_(LCD_DISPLAY_COMMAND_CLEAR_DISPLAY);
|
this->buffer_[i] = ' ';
|
||||||
delay(2);
|
|
||||||
}
|
}
|
||||||
#ifdef USE_TIME
|
#ifdef USE_TIME
|
||||||
void LCDDisplay::strftime(uint8_t column, uint8_t row, const char *format, time::ESPTime time) {
|
void LCDDisplay::strftime(uint8_t column, uint8_t row, const char *format, time::ESPTime time) {
|
||||||
|
|
Loading…
Reference in a new issue