forked from shashwat001/hollow_clock_wifi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb_ui.h
More file actions
39 lines (31 loc) · 906 Bytes
/
Copy pathweb_ui.h
File metadata and controls
39 lines (31 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef WEB_UI_H
#define WEB_UI_H
#include <ESPAsyncWebSrv.h>
#include <string>
#include "dashboard.h"
struct WebUiState {
bool *motion_enabled;
bool *is_resetting;
String *calibration_status;
int *target;
};
struct WebUiCallbacks {
std::string (*uptime_text)();
std::string (*time_text)();
int (*current_pos)();
int (*target)();
std::string (*ssid_text)();
std::string (*ip_text)();
std::string (*ntp_server_text)();
std::string (*status_text)();
int (*last_reset_pos)();
int (*last_reset_target)();
std::string (*last_reset_time_text)();
bool (*is_numeric_string)(const String &value);
bool (*set_current_position_from_time)(int hours, int minutes);
int (*get_current_time_steps)();
void (*on_start_reset)(int target);
};
void setup_web_ui(AsyncWebServer *server, Dashboard **dashboard,
WebUiState *state, WebUiCallbacks callbacks);
#endif