mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 11:26:39 +00:00
[nextion] Fix alternative code path for dump_device_info (#13566)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci-lite[bot]
parent
f9687a2a31
commit
f87aa384d0
@@ -150,27 +150,24 @@ void Nextion::dump_config() {
|
|||||||
#ifdef USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
|
#ifdef USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
|
||||||
ESP_LOGCONFIG(TAG, " Skip handshake: YES");
|
ESP_LOGCONFIG(TAG, " Skip handshake: YES");
|
||||||
#else // USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
|
#else // USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
|
||||||
ESP_LOGCONFIG(TAG,
|
|
||||||
#ifdef USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
|
#ifdef USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
|
||||||
|
ESP_LOGCONFIG(TAG,
|
||||||
" Device Model: %s\n"
|
" Device Model: %s\n"
|
||||||
" FW Version: %s\n"
|
" FW Version: %s\n"
|
||||||
" Serial Number: %s\n"
|
" Serial Number: %s\n"
|
||||||
" Flash Size: %s\n"
|
" Flash Size: %s\n"
|
||||||
" Max queue age: %u ms\n"
|
" Max queue age: %u ms\n"
|
||||||
" Startup override: %u ms\n",
|
" Startup override: %u ms\n",
|
||||||
|
this->device_model_.c_str(), this->firmware_version_.c_str(), this->serial_number_.c_str(),
|
||||||
|
this->flash_size_.c_str(), this->max_q_age_ms_, this->startup_override_ms_);
|
||||||
#endif // USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
|
#endif // USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
|
||||||
#ifdef USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START
|
#ifdef USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START
|
||||||
" Exit reparse: YES\n"
|
ESP_LOGCONFIG(TAG, " Exit reparse: YES\n");
|
||||||
#endif // USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START
|
#endif // USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START
|
||||||
|
ESP_LOGCONFIG(TAG,
|
||||||
" Wake On Touch: %s\n"
|
" Wake On Touch: %s\n"
|
||||||
" Touch Timeout: %" PRIu16,
|
" Touch Timeout: %" PRIu16,
|
||||||
#ifdef USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
|
YESNO(this->connection_state_.auto_wake_on_touch_), this->touch_sleep_timeout_);
|
||||||
this->device_model_.c_str(), this->firmware_version_.c_str(), this->serial_number_.c_str(),
|
|
||||||
this->flash_size_.c_str(), this->max_q_age_ms_,
|
|
||||||
this->startup_override_ms_
|
|
||||||
#endif // USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
|
|
||||||
YESNO(this->connection_state_.auto_wake_on_touch_),
|
|
||||||
this->touch_sleep_timeout_);
|
|
||||||
#endif // USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
|
#endif // USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
|
||||||
|
|
||||||
#ifdef USE_NEXTION_MAX_COMMANDS_PER_LOOP
|
#ifdef USE_NEXTION_MAX_COMMANDS_PER_LOOP
|
||||||
|
|||||||
@@ -273,12 +273,9 @@ text_sensor:
|
|||||||
display:
|
display:
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
id: main_lcd
|
id: main_lcd
|
||||||
update_interval: 5s
|
|
||||||
command_spacing: 5ms
|
|
||||||
max_commands_per_loop: 20
|
max_commands_per_loop: 20
|
||||||
max_queue_size: 50
|
max_queue_size: 50
|
||||||
startup_override_ms: 10000ms # Wait 10s for display ready
|
update_interval: 5s
|
||||||
max_queue_age: 5000ms # Remove queue items after 5s
|
|
||||||
on_sleep:
|
on_sleep:
|
||||||
then:
|
then:
|
||||||
lambda: 'ESP_LOGD("display","Display went to sleep");'
|
lambda: 'ESP_LOGD("display","Display went to sleep");'
|
||||||
@@ -294,3 +291,8 @@ display:
|
|||||||
on_buffer_overflow:
|
on_buffer_overflow:
|
||||||
then:
|
then:
|
||||||
logger.log: "Nextion reported a buffer overflow!"
|
logger.log: "Nextion reported a buffer overflow!"
|
||||||
|
|
||||||
|
command_spacing: 5ms
|
||||||
|
dump_device_info: true
|
||||||
|
max_queue_age: 5000ms # Remove queue items after 5s
|
||||||
|
startup_override_ms: 10000ms # Wait 10s for display ready
|
||||||
|
|||||||
Reference in New Issue
Block a user