Add a watchdog module to meshsolar. (#9337)

* add watchdog module

* Restore the code in power.h

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Quency-D
2026-01-29 10:41:27 +08:00
committed by GitHub
parent df400850c1
commit b2f2f6b305
4 changed files with 75 additions and 7 deletions

View File

@@ -91,6 +91,9 @@
#include "modules/DropzoneModule.h"
#endif
#if defined(HAS_HARDWARE_WATCHDOG)
#include "watchdog/watchdogThread.h"
#endif
/**
* Create module instances here. If you are adding a new module, you must 'new' it here (or somewhere else)
*/
@@ -229,6 +232,9 @@ void setupModules()
#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS
if (moduleConfig.has_range_test && moduleConfig.range_test.enabled)
new RangeTestModule();
#endif
#if defined(HAS_HARDWARE_WATCHDOG)
watchdogThread = new WatchdogThread();
#endif
// NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra
// acks