Farm mode - reset using watchdog for MK3

This commit is contained in:
Robert Pelnar 2018-06-25 16:04:47 +02:00
parent 39bb58c12d
commit 6d4c3b8b27

View File

@ -3274,7 +3274,13 @@ void process_commands()
} else if (code_seen("RESET")) {
// careful!
if (farm_mode) {
asm volatile(" jmp 0x3E000");
#ifdef WATCHDOG
wdt_enable(WDTO_15MS);
cli();
while(1);
#else //WATCHDOG
asm volatile("jmp 0x3E000");
#endif //WATCHDOG
}
else {
MYSERIAL.println("Not in farm mode.");