Refactor device-dashboard

This commit is contained in:
Sergio R. Caprile committed 2023-05-26 20:45:08 -03:00
1 parent 49a9bb5a8b
commit 58606e1702
29 files changed
+5123 -4476

No files matched your search

+2 -2
View File
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#define LED1 PIN('N', 1) // On-board LED pin
#define LED2 PIN('N', 0) // On-board LED pin
@@ -89,8 +90,7 @@ int main(void) {
}
MG_INFO(("Initialising application..."));
extern void device_dashboard_fn(struct mg_connection *, int, void *, void *);
mg_http_listen(&mgr, "http://0.0.0.0", device_dashboard_fn, NULL);
web_init(&mgr);
MG_INFO(("Starting event loop"));
for (;;) {
+2 -2
View File
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#define LED1 PIN('N', 1) // On-board LED pin
#define LED2 PIN('N', 0) // On-board LED pin
@@ -74,8 +75,7 @@ static void server(void *args) {
}
MG_INFO(("Initialising application..."));
extern void device_dashboard_fn(struct mg_connection *, int, void *, void *);
mg_http_listen(&mgr, "http://0.0.0.0", device_dashboard_fn, NULL);
web_init(&mgr);
MG_INFO(("Starting event loop"));
for (;;) mg_mgr_poll(&mgr, 1); // Infinite event loop