+
+ // 10 second watchdog timeout (or config as seconds)
+ float t= kernel->config->value( watchdog_timeout_checksum )->by_default(10.0F)->as_number();
+ if(t > 0.1F) {
+ // NOTE setting WDT_RESET with the current bootloader would leave it in DFU mode which would be suboptimal
+ kernel->add_module( new Watchdog(t*1000000, WDT_MRI)); // WDT_RESET));
+ kernel->streams->printf("Watchdog enabled for %f seconds\n", t);
+ }else{
+ kernel->streams->printf("WARNING Watchdog is disabled\n");
+ }
+
+