8 static const char *
const TAG =
"lcd_menu";
22 ESP_LOGCONFIG(TAG,
"LCD Menu");
23 ESP_LOGCONFIG(TAG,
" Columns: %u, Rows: %u", this->
columns_, this->
rows_);
27 ESP_LOGE(TAG,
"The connected display failed, the menu is disabled!");
54 size_t n = std::min(text.size(), (size_t) this->
columns_ - 2);
55 memcpy(data + 1, item->
get_text().c_str(), n);
62 size_t val_width = std::min((
size_t) this->
columns_ - 7, value.length());
63 memcpy(data + this->
columns_ - val_width - 4,
" [", 2);
64 memcpy(data + this->
columns_ - val_width - 2, value.c_str(), val_width);
virtual void setup()
Where the component's initialization should happen.
const float PROCESSOR
For components that use data from sensors like displays.
void print(uint8_t column, uint8_t row, const char *str)
Print the given text at the specified column and row.
virtual void mark_failed()
Mark this component as failed.
Implementation of SPI Controller mode.