From 4660c0cd13b670f1f30683f4d17d0c77b074783b Mon Sep 17 00:00:00 2001 From: Kristian Kielhofner Date: Mon, 11 Sep 2023 13:18:56 -0500 Subject: [PATCH] Support TTS (without status because OpenHAB doesn't provide), remove text color, standardize feedback language (cherry picked from commit f3471025904f52a9dddfd7db9ca15c9c58b48fad) --- main/endpoint/openhab.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/endpoint/openhab.c b/main/endpoint/openhab.c index b4bb3129..63b40f81 100644 --- a/main/endpoint/openhab.c +++ b/main/endpoint/openhab.c @@ -63,9 +63,9 @@ void openhab_send(const char *data) end: free(url); if (ok) { - war.fn_ok("ok"); + war.fn_ok("Success"); } else { - war.fn_err("error"); + war.fn_err("Error"); } if (body != NULL && strlen(body) > 1) { @@ -75,12 +75,12 @@ void openhab_send(const char *data) if (lvgl_port_lock(lvgl_lock_timeout)) { lv_obj_clear_flag(lbl_ln4, LV_OBJ_FLAG_HIDDEN); lv_obj_clear_flag(lbl_ln5, LV_OBJ_FLAG_HIDDEN); - lv_label_set_text_static(lbl_ln4, "Command status:"); lv_obj_remove_event_cb(lbl_ln4, cb_btn_cancel); + lv_label_set_text_static(lbl_ln4, "Command status:"); if (body != NULL && strlen(body) > 1) { lv_label_set_text(lbl_ln5, body); } else { - lv_label_set_text(lbl_ln5, ok ? "#008000 Success!" : "#ff0000 Error"); + lv_label_set_text(lbl_ln5, ok ? "Success!" : "Error"); } lvgl_port_unlock(); }