affichage EtatMachine

This commit is contained in:
Marc Pasteur 2026-02-23 15:15:03 +01:00
parent 2da4a8f94b
commit 5bd2ef288a
4 changed files with 16 additions and 3 deletions

View File

@ -109,6 +109,7 @@ void draw_time(struct tm *dateHeure){
//} //}
} }
void draw_temp(char * tempHumid){ void draw_temp(char * tempHumid){
if(display_lock("draw_temp")){ if(display_lock("draw_temp")){
lv_label_set_text(lblTempInt2,tempHumid); lv_label_set_text(lblTempInt2,tempHumid);
@ -1426,12 +1427,21 @@ void messageCardContent(lv_obj_t *cont_messages)
weatherDay_fragment_create_obj(0, container, true); weatherDay_fragment_create_obj(0, container, true);
// lv_subject_add_observer_obj(&forecastD1Subj, weatherdata_obs_cb, container, NULL); // lv_subject_add_observer_obj(&forecastD1Subj, weatherdata_obs_cb, container, NULL);
} }
lv_obj_t *txtMinuteur;
void minuteurCardContent(lv_obj_t * container) void minuteurCardContent(lv_obj_t * container)
{ {
lv_obj_t *txt = lv_label_create(container); txtMinuteur = lv_label_create(container);
lv_label_set_text(txt, "Rien à signaler !"); 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) static void backCb(lv_event_t * e)
{ {
ESP_LOGE(TAG, "We're here !!!!!!!!!!!!!!!!!!!!!!"); ESP_LOGE(TAG, "We're here !!!!!!!!!!!!!!!!!!!!!!");

View File

@ -91,6 +91,7 @@ void traiteEvt(void *arg)
char etat[80]; char etat[80];
getEtatMachineStr(wms, etat,80); getEtatMachineStr(wms, etat,80);
ESP_LOGE(TAG,"Etat machine : %s", etat); ESP_LOGE(TAG,"Etat machine : %s", etat);
draw_minuteur(etat);
// lv_label_set_text(lblEtatMachine, etatFormate); // lv_label_set_text(lblEtatMachine, etatFormate);
break; break;
} }

View File

@ -22,6 +22,7 @@ void meteoCb(lv_obj_t *base_obj);
void drawHome(); void drawHome();
void draw_time(struct tm *dateHeure); void draw_time(struct tm *dateHeure);
void draw_minuteur(char *txt);
void draw_temp(char *tempHumid); void draw_temp(char *tempHumid);
void create_card(); void create_card();

View File

@ -7,6 +7,8 @@
#endif #endif
#include "esp_log.h" #include "esp_log.h"
static const char *TAG = "domo_mqtt";
/* FreeRTOS event group to signal when we are connected*/ /* FreeRTOS event group to signal when we are connected*/
static EventGroupHandle_t s_wifi_event_group; static EventGroupHandle_t s_wifi_event_group;
@ -146,7 +148,6 @@ int64_t esp_timer_get_time(void)
esp_mqtt_client_handle_t client; esp_mqtt_client_handle_t client;
static const char *TAG = "domo_mqtt";
static void log_error_if_nonzero(const char *message, int error_code) static void log_error_if_nonzero(const char *message, int error_code)