mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-26 15:48:28 +02:00
Nextion send_command method (#6540)
This is a simplified version of `send_command_printf` without the `printf` support. Manually send a raw command to the display. param command The pcommand, like "page 0" return Whether the send was successful.
This commit is contained in:
@@ -194,6 +194,17 @@ void Nextion::update_all_components() {
|
||||
}
|
||||
}
|
||||
|
||||
bool Nextion::send_command(const char *command) {
|
||||
if ((!this->is_setup() && !this->ignore_is_setup_) || this->is_sleeping())
|
||||
return false;
|
||||
|
||||
if (this->send_command_(command)) {
|
||||
this->add_no_result_to_queue_("send_command");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Nextion::send_command_printf(const char *format, ...) {
|
||||
if ((!this->is_setup() && !this->ignore_is_setup_) || this->is_sleeping())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user