Use macro YESNO to standardize True/False messages
This commit is contained in:
@@ -114,7 +114,7 @@ script:
|
||||
call.set_mode(value);
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Invalid call:");
|
||||
ESP_LOGE(TAG, " Embedded: %s", embedded ? "True" : "False");
|
||||
ESP_LOGE(TAG, " Embedded: %s", YESNO(embedded));
|
||||
ESP_LOGE(TAG, " Key: %s", key.c_str());
|
||||
ESP_LOGE(TAG, " Value: %s", value.c_str());
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ script:
|
||||
|
||||
ESP_LOGD(TAG, " Target upload baud rate: %d bps", id(baud_rate_target));
|
||||
ESP_LOGD(TAG, " Current baud rate: %" PRIu32 " bps", tf_uart->get_baud_rate());
|
||||
ESP_LOGD(TAG, " Valid TFT: %s", id(tft_is_valid) ? "True" : "False");
|
||||
ESP_LOGD(TAG, " Valid TFT: %s", YESNO(id(tft_is_valid)));
|
||||
|
||||
// Upload URL
|
||||
ESP_LOGD(TAG, " Upload URL: %s", url.c_str());
|
||||
@@ -646,7 +646,7 @@ script:
|
||||
auto upload_end_ = [&](bool completed) -> bool
|
||||
{
|
||||
static const char *const TAG = "script.upload_tft.upload_end_";
|
||||
ESP_LOGD(TAG, "Completed: %s", completed ? "True" : "False");
|
||||
ESP_LOGD(TAG, "Completed: %s", YESNO(completed));
|
||||
//ESP_LOGD(TAG, "Restarting Nextion");
|
||||
//send_nextion_command("rest");
|
||||
#ifdef ARDUINO
|
||||
|
||||
@@ -564,10 +564,10 @@ api:
|
||||
ESP_LOGV(TAG, "notification_icon: %s", notification_icon.c_str());
|
||||
ESP_LOGV(TAG, "notification_icon_color_normal: %i", notification_icon_color_normal.size());
|
||||
ESP_LOGV(TAG, "notification_icon_color_unread: %i", notification_icon_color_unread.size());
|
||||
ESP_LOGV(TAG, "qrcode: %s", qrcode ? "True" : "False");
|
||||
ESP_LOGV(TAG, "qrcode: %s", YESNO(qrcode));
|
||||
ESP_LOGV(TAG, "qrcode_icon: %s", qrcode_icon.c_str());
|
||||
ESP_LOGV(TAG, "qrcode_icon_color: %i", qrcode_icon_color.size());
|
||||
ESP_LOGV(TAG, "entities_pages: %s", entities_pages ? "True" : "False");
|
||||
ESP_LOGV(TAG, "entities_pages: %s", YESNO(entities_pages));
|
||||
ESP_LOGV(TAG, "entities_pages_icon: %s", entities_pages_icon.c_str());
|
||||
ESP_LOGV(TAG, "entities_pages_icon_color: %i", entities_pages_icon_color.size());
|
||||
|
||||
@@ -2072,8 +2072,8 @@ script:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "script.nextion_status";
|
||||
ESP_LOGD(TAG, "Nextion status:");
|
||||
ESP_LOGD(TAG, " Is detected: %s", disp1->is_detected() ? "True" : "False");
|
||||
ESP_LOGD(TAG, " Is setup: %s", disp1->is_setup() ? "True" : "False");
|
||||
ESP_LOGD(TAG, " Is detected: %s", YESNO(disp1->is_detected()));
|
||||
ESP_LOGD(TAG, " Is setup: %s", YESNO(disp1->is_setup()));
|
||||
ESP_LOGD(TAG, " Queue size: %d", disp1->queue_size());
|
||||
|
||||
- id: notification_clear
|
||||
@@ -2441,7 +2441,7 @@ script:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "script.refresh_notification";
|
||||
bool is_notification = ((not notification_text->state.empty()) or (not notification_label->state.empty()));
|
||||
ESP_LOGV(TAG, "Notification: %s", is_notification ? "True" : "False");
|
||||
ESP_LOGV(TAG, "Notification: %s", YESNO(is_notification));
|
||||
disp1->send_command_printf("is_notification=%i", is_notification ? 0 : 1);
|
||||
if (current_page->state == "home") {
|
||||
if (is_notification) {
|
||||
@@ -2657,7 +2657,7 @@ script:
|
||||
ESP_LOGD(TAG, " total_steps: %d", total_steps);
|
||||
ESP_LOGD(TAG, " temp_offset: %i", temp_offset);
|
||||
ESP_LOGD(TAG, " climate_icon: %s", climate_icon.c_str());
|
||||
ESP_LOGD(TAG, " embedded_climate: %s", embedded_climate ? "True" : "False");
|
||||
ESP_LOGD(TAG, " embedded_climate: %s", YESNO(embedded_climate));
|
||||
if (current_page->state == "climate") {
|
||||
ESP_LOGD(TAG, "Page climate is visible");
|
||||
disp1->send_command_printf("climateslider.maxval=%i", total_steps);
|
||||
@@ -3312,7 +3312,7 @@ script:
|
||||
ESP_LOGI(TAG, " Is setup: True");
|
||||
else {
|
||||
ESP_LOGW(TAG, " Is setup: False");
|
||||
ESP_LOGW(TAG, " Is detected: %s", disp1->is_detected() ? "True" : "False");
|
||||
ESP_LOGW(TAG, " Is detected: %s", YESNO(disp1->is_detected()));
|
||||
//exit_reparse->execute();
|
||||
}
|
||||
if (nextion_init->state) {
|
||||
|
||||
Reference in New Issue
Block a user