updated to device dashboard new structure

This commit is contained in:
Sergio R. Caprile committed 2026-04-08 11:41:26 -03:00
1 parent 2dffbc32ba
commit 5379de4c54
16 files changed
+36 -33

No files matched your search

@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#define BLINK_PERIOD_MS 1000 // LED blinking period in millis
@@ -57,8 +58,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 (;;) {
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "ethernetif.h"
#include "lwip/dhcp.h"
@@ -35,8 +36,7 @@ static void server(void *args) {
mg_log_set(MG_LL_DEBUG); // Set log level
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, 1000); // Infinite event loop
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
extern RNG_HandleTypeDef hrng;
@@ -31,8 +32,7 @@ static void server(void *args) {
mg_log_set(MG_LL_DEBUG); // Set log level
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, 1000); // Infinite event loop
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#define BLINK_PERIOD_MS 1000 // LED blinking period in millis
@@ -53,8 +54,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
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "cmsis_os2.h"
#include "ethernetif.h"
@@ -28,8 +29,7 @@ static void server(void *args) {
mg_log_set(MG_LL_DEBUG); // Set log level
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, 1000); // Infinite event loop
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "cmsis_os2.h"
@@ -47,8 +48,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
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "cmsis_os.h"
@@ -24,8 +25,7 @@ static void server(const void *args) {
mg_log_set(MG_LL_DEBUG); // Set log level
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, 1000); // Infinite event loop
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "cmsis_os.h"
@@ -47,8 +48,7 @@ static void server(const 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
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "cmsis_os2.h"
#include "ethernetif.h"
@@ -28,8 +29,7 @@ static void server(void *args) {
mg_log_set(MG_LL_DEBUG); // Set log level
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, 1000); // Infinite event loop
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "cmsis_os2.h"
@@ -24,8 +25,7 @@ static void server(void *args) {
mg_log_set(MG_LL_DEBUG); // Set log level
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, 1000); // Infinite event loop
@@ -3,6 +3,7 @@
#include "hal.h"
#include "mongoose.h"
#include "net.h"
#include "main.h"
#include "cmsis_os2.h"
@@ -47,8 +48,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
+4 -3
View File
@@ -9,11 +9,11 @@ all:
cp ../../LICENSE License.txt
cp ../../README.md .
cp ../../mongoose.[ch] Mongoose/
grep -l device_dashboard_fn Boards/*/*/*/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/net.c
grep -l device_dashboard_fn Boards/*/*/*/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/packed_fs.c
grep -l net.h Boards/*/*/*/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/net.[ch]
grep -l net.h Boards/*/*/*/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/packed_fs.c
$(GENPACK)
rm License.txt README.md Mongoose/mongoose.[ch]
rm -f Boards/*/*/*/net.c
rm -f Boards/*/*/*/net.[ch]
rm -f Boards/*/*/*/packed_fs.c
clean:
@@ -44,6 +44,7 @@ keilexamples: $(KEILDIRS)
$(KEILDIRS): FORCE # copy anyway, even if not needed
copy /Y ..\..\examples\device-dashboard\net.c $(subst /,\,$@)
copy /Y ..\..\examples\device-dashboard\net.h $(subst /,\,$@)
copy /Y ..\..\examples\device-dashboard\packed_fs.c $(subst /,\,$@)
# not removed
@@ -24,6 +24,7 @@
/* USER CODE BEGIN Includes */
#include "hal.h"
#include "mongoose.h"
#include "net.h"
/* USER CODE END Includes */
@@ -163,8 +164,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"));
@@ -25,6 +25,7 @@
/* USER CODE BEGIN Includes */
#include "hal.h"
#include "mongoose.h"
#include "net.h"
/* USER CODE END Includes */
@@ -348,8 +349,7 @@ static void server(void const *args) {
mg_log_set(MG_LL_DEBUG); // Set log level
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, 1000); // Infinite event loop
@@ -25,6 +25,7 @@
/* USER CODE BEGIN Includes */
#include "hal.h"
#include "mongoose.h"
#include "net.h"
/* USER CODE END Includes */
@@ -490,8 +491,7 @@ void server(void *argument)
}
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
+4 -2
View File
@@ -3,8 +3,9 @@
pre:
find Examples/* -maxdepth 0 -exec mkdir -p {}"/Middlewares/Third_Party/Cesanta_Network Library/Mongoose/" \;
find Examples/* -maxdepth 0 -exec cp ../../mongoose.[ch] {}"/Middlewares/Third_Party/Cesanta_Network Library/Mongoose/" \;
grep -l device_dashboard_fn Examples/*/Core/Src/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/net.c
grep -l device_dashboard_fn Examples/*/Core/Src/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/packed_fs.c
grep -l net.h Examples/*/Core/Src/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/net.c
grep -l net.h Examples/*/Core/Src/main.c | xargs -n 1 dirname | sed 's.$$./.' | sed 's/Src/Inc/' | xargs -n 1 cp ../../examples/device-dashboard/net.h
grep -l net.h Examples/*/Core/Src/main.c | xargs -n 1 dirname | sed 's.$$./.' | xargs -n 1 cp ../../examples/device-dashboard/packed_fs.c
$(MAKE) -f ../../test/cube/Makefile "PROJECTS=$(wildcard Examples/*)"
sudo rm -rf Examples/*/Debug
sudo rm -rf Examples/*/Release
@@ -12,6 +13,7 @@ pre:
post:
rm -f Examples/*/Middlewares/Third_Party/Cesanta_Network\ Library/Mongoose/mongoose.[ch]
rm -f Examples/*/Core/Src/net.c
rm -f Examples/*/Core/Inc/net.h
rm -f Examples/*/Core/Src/packed_fs.c
packcreator: