mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	change lcd clear() to clear the buffer (#1600)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
		| @@ -104,9 +104,7 @@ void HOT LCDDisplay::display() { | ||||
|   } | ||||
| } | ||||
| void LCDDisplay::update() { | ||||
|   for (uint8_t i = 0; i < this->rows_ * this->columns_; i++) | ||||
|     this->buffer_[i] = ' '; | ||||
|  | ||||
|   this->clear(); | ||||
|   this->call_writer(); | ||||
|   this->display(); | ||||
| } | ||||
| @@ -149,9 +147,8 @@ void LCDDisplay::printf(const char *format, ...) { | ||||
|     this->print(0, 0, buffer); | ||||
| } | ||||
| void LCDDisplay::clear() { | ||||
|   // clear display, also sets DDRAM address to 0 (home) | ||||
|   this->command_(LCD_DISPLAY_COMMAND_CLEAR_DISPLAY); | ||||
|   delay(2); | ||||
|   for (uint8_t i = 0; i < this->rows_ * this->columns_; i++) | ||||
|     this->buffer_[i] = ' '; | ||||
| } | ||||
| #ifdef USE_TIME | ||||
| void LCDDisplay::strftime(uint8_t column, uint8_t row, const char *format, time::ESPTime time) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user