42 lines
967 B
C
42 lines
967 B
C
#ifndef DASHBOARD_UI_H
|
|
#define DASHBOARD_UI_H
|
|
|
|
#include "ws_client.h"
|
|
#include "lvgl.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* Create the full dashboard UI. Must be called with LVGL lock held.
|
|
*/
|
|
void dashboard_ui_create(void);
|
|
|
|
/**
|
|
* Update Pi server stats display. LVGL lock must be held by caller.
|
|
*/
|
|
void dashboard_ui_update_stats(const pi_stats_t *stats);
|
|
|
|
/**
|
|
* Update local sensor readings. LVGL lock must be held by caller.
|
|
*/
|
|
void dashboard_ui_update_local(float temp, float humidity, uint8_t battery);
|
|
|
|
/**
|
|
* Update time display. LVGL lock must be held by caller.
|
|
*/
|
|
void dashboard_ui_update_time(int h, int m, int s);
|
|
|
|
/**
|
|
* Update connection status indicators. LVGL lock must be held by caller.
|
|
* ip_str: IP address string when connected, "Connecting..." during reconnect, "N/A" when disconnected
|
|
*/
|
|
void dashboard_ui_update_connection(ws_state_t ws_state, bool wifi_connected, const char *ip_str);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|