mirror of
https://github.com/esphome/esphome.git
synced 2026-05-28 04:55:48 +08:00
[nextion] Fix format specifiers and error message typos in command handlers (#15542)
This commit is contained in:
@@ -706,7 +706,7 @@ void Nextion::process_nextion_commands_() {
|
|||||||
auto index = to_process.find('\0');
|
auto index = to_process.find('\0');
|
||||||
if (index == std::string::npos || (to_process_length - index - 1) < 1) {
|
if (index == std::string::npos || (to_process_length - index - 1) < 1) {
|
||||||
ESP_LOGE(TAG, "Bad switch data (0x90)");
|
ESP_LOGE(TAG, "Bad switch data (0x90)");
|
||||||
ESP_LOGN(TAG, "proc: %s %zu %d", to_process.c_str(), to_process_length, index);
|
ESP_LOGN(TAG, "proc: %s %zu %zu", to_process.c_str(), to_process_length, index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -732,7 +732,7 @@ void Nextion::process_nextion_commands_() {
|
|||||||
auto index = to_process.find('\0');
|
auto index = to_process.find('\0');
|
||||||
if (index == std::string::npos || (to_process_length - index - 1) != 4) {
|
if (index == std::string::npos || (to_process_length - index - 1) != 4) {
|
||||||
ESP_LOGE(TAG, "Bad sensor data (0x91)");
|
ESP_LOGE(TAG, "Bad sensor data (0x91)");
|
||||||
ESP_LOGN(TAG, "proc: %s %zu %d", to_process.c_str(), to_process_length, index);
|
ESP_LOGN(TAG, "proc: %s %zu %zu", to_process.c_str(), to_process_length, index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -765,7 +765,7 @@ void Nextion::process_nextion_commands_() {
|
|||||||
auto index = to_process.find('\0');
|
auto index = to_process.find('\0');
|
||||||
if (index == std::string::npos || (to_process_length - index - 1) < 1) {
|
if (index == std::string::npos || (to_process_length - index - 1) < 1) {
|
||||||
ESP_LOGE(TAG, "Bad text data (0x92)");
|
ESP_LOGE(TAG, "Bad text data (0x92)");
|
||||||
ESP_LOGN(TAG, "proc: %s %zu %d", to_process.c_str(), to_process_length, index);
|
ESP_LOGN(TAG, "proc: %s %zu %zu", to_process.c_str(), to_process_length, index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -798,8 +798,8 @@ void Nextion::process_nextion_commands_() {
|
|||||||
// Get variable name
|
// Get variable name
|
||||||
auto index = to_process.find('\0');
|
auto index = to_process.find('\0');
|
||||||
if (index == std::string::npos || (to_process_length - index - 1) < 1) {
|
if (index == std::string::npos || (to_process_length - index - 1) < 1) {
|
||||||
ESP_LOGE(TAG, "Bad binary data (0x92)");
|
ESP_LOGE(TAG, "Bad binary data (0x93)");
|
||||||
ESP_LOGN(TAG, "proc: %s %zu %d", to_process.c_str(), to_process_length, index);
|
ESP_LOGN(TAG, "proc: %s %zu %zu", to_process.c_str(), to_process_length, index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user