simple_room_server: dfu, radio silence watchdog and get boot via NodeMaintenance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-04 01:25:27 +01:00
1 parent 2ced8502a0
commit a8f0c3dca6
3 files changed
+17 -3

No files matched your search

+10
View File
@@ -2,6 +2,7 @@
#include <Mesh.h>
#include "MyMesh.h"
#include <helpers/NodeMaintenance.h>
#ifdef ETHERNET_ENABLED
#define ETHERNET_CLI_BANNER "MeshCore Room Server CLI"
@@ -17,6 +18,12 @@ StdRNG fast_rng;
SimpleMeshTables tables;
MyMesh the_mesh(board, radio_driver, *new ArduinoMillis(), fast_rng, rtc_clock, tables);
// CUSTOM (TeTeHacko): dfu, radio silence watchdog, `get boot` -- see NodeMaintenance.h.
static NodeMaintenance maint(board, radio_driver);
bool maintHandleCommand(uint32_t sender_timestamp, const char* command, char* reply) {
return maint.handleCommand(sender_timestamp, command, reply);
}
void halt() {
while (1) ;
}
@@ -31,6 +38,7 @@ void setup() {
delay(1000);
board.begin();
maint.printBootDiag();
#ifdef HAS_EXTERNAL_WATCHDOG
external_watchdog.begin();
@@ -86,6 +94,7 @@ void setup() {
sensors.begin();
the_mesh.begin(fs);
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh);
#ifdef DISPLAY_CLASS
ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION);
@@ -157,6 +166,7 @@ void loop() {
#endif
the_mesh.loop();
maint.loop();
sensors.loop();
#ifdef DISPLAY_CLASS
ui_task.loop();