diff --git a/components/domotic_display/ihm.c b/components/domotic_display/ihm.c index ae5e336..1c43861 100644 --- a/components/domotic_display/ihm.c +++ b/components/domotic_display/ihm.c @@ -109,6 +109,7 @@ void draw_time(struct tm *dateHeure){ //} } + void draw_temp(char * tempHumid){ if(display_lock("draw_temp")){ lv_label_set_text(lblTempInt2,tempHumid); @@ -1426,12 +1427,21 @@ void messageCardContent(lv_obj_t *cont_messages) weatherDay_fragment_create_obj(0, container, true); // lv_subject_add_observer_obj(&forecastD1Subj, weatherdata_obs_cb, container, NULL); } + + lv_obj_t *txtMinuteur; void minuteurCardContent(lv_obj_t * container) { - lv_obj_t *txt = lv_label_create(container); - lv_label_set_text(txt, "Rien à signaler !"); + txtMinuteur = lv_label_create(container); + lv_label_set_long_mode(txtMinuteur, LV_LABEL_LONG_MODE_WRAP); + lv_label_set_text(txtMinuteur, "Rien à signaler !"); + lv_obj_set_width(txtMinuteur, LV_PCT(100)); } + void draw_minuteur(char *txt){ + lv_label_set_text(txtMinuteur, txt); +} + + static void backCb(lv_event_t * e) { ESP_LOGE(TAG, "We're here !!!!!!!!!!!!!!!!!!!!!!"); diff --git a/components/domotic_display/ihm_gateway.c b/components/domotic_display/ihm_gateway.c index 93073d2..cc8f418 100644 --- a/components/domotic_display/ihm_gateway.c +++ b/components/domotic_display/ihm_gateway.c @@ -91,6 +91,7 @@ void traiteEvt(void *arg) char etat[80]; getEtatMachineStr(wms, etat,80); ESP_LOGE(TAG,"Etat machine : %s", etat); + draw_minuteur(etat); // lv_label_set_text(lblEtatMachine, etatFormate); break; } diff --git a/components/domotic_display/include/ihm.h b/components/domotic_display/include/ihm.h index cb040e4..d798a26 100644 --- a/components/domotic_display/include/ihm.h +++ b/components/domotic_display/include/ihm.h @@ -22,6 +22,7 @@ void meteoCb(lv_obj_t *base_obj); void drawHome(); void draw_time(struct tm *dateHeure); +void draw_minuteur(char *txt); void draw_temp(char *tempHumid); void create_card(); diff --git a/main/communication.c b/main/communication.c index 4e90ede..e656ceb 100644 --- a/main/communication.c +++ b/main/communication.c @@ -7,6 +7,8 @@ #endif #include "esp_log.h" +static const char *TAG = "domo_mqtt"; + /* FreeRTOS event group to signal when we are connected*/ static EventGroupHandle_t s_wifi_event_group; @@ -146,7 +148,6 @@ int64_t esp_timer_get_time(void) esp_mqtt_client_handle_t client; -static const char *TAG = "domo_mqtt"; static void log_error_if_nonzero(const char *message, int error_code)