Allow resetting when not in farm mode

This commit is contained in:
Voinea Dragos 2021-01-19 13:39:21 +02:00
parent 48b4bdfe8e
commit 70d254a1fc
1 changed files with 7 additions and 9 deletions

View File

@ -3918,21 +3918,19 @@ void process_commands()
mmu_reset(); mmu_reset();
} }
else if (code_seen("RESET")) { // PRUSA RESET else if (code_seen("RESET")) { // PRUSA RESET
// careful!
if (farm_mode) {
#ifdef WATCHDOG #ifdef WATCHDOG
#if defined(W25X20CL) && defined(BOOTAPP) #if defined(W25X20CL) && defined(BOOTAPP)
boot_app_magic = BOOT_APP_MAGIC; boot_app_magic = BOOT_APP_MAGIC;
boot_app_flags = BOOT_APP_FLG_RUN; boot_app_flags = BOOT_APP_FLG_RUN;
#endif //defined(W25X20CL) && defined(BOOTAPP) #endif //defined(W25X20CL) && defined(BOOTAPP)
softReset(); softReset();
#else //WATCHDOG #else //WATCHDOG
// careful!
if (farm_mode)
asm volatile("jmp 0x3E000"); asm volatile("jmp 0x3E000");
else
puts_P(PSTR("Not in farm mode."));
#endif //WATCHDOG #endif //WATCHDOG
}
else {
MYSERIAL.println("Not in farm mode.");
}
}else if (code_seen("fv")) { // PRUSA fv }else if (code_seen("fv")) { // PRUSA fv
// get file version // get file version
#ifdef SDSUPPORT #ifdef SDSUPPORT