From 3248edc1ca610627c2e88366bd76f792d9765958 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Tue, 26 Jun 2018 20:12:09 +0200 Subject: [PATCH] Do not skip bootloader when initiating reset by farm PRUSA RESET command. Set bootloader magic and run flag before watchdog reset in PRUSA RESET command. --- Firmware/Marlin_main.cpp | 2 ++ Firmware/bootapp.h | 1 + 2 files changed, 3 insertions(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 225883bf..9e210ebe 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -3283,6 +3283,8 @@ void process_commands() // careful! if (farm_mode) { #ifdef WATCHDOG + boot_app_magic = BOOT_APP_MAGIC; + boot_app_flags = BOOT_APP_FLG_RUN; wdt_enable(WDTO_15MS); cli(); while(1); diff --git a/Firmware/bootapp.h b/Firmware/bootapp.h index db5bcc77..cbae89a7 100644 --- a/Firmware/bootapp.h +++ b/Firmware/bootapp.h @@ -17,6 +17,7 @@ #define BOOT_APP_FLG_ERASE 0x01 #define BOOT_APP_FLG_COPY 0x02 #define BOOT_APP_FLG_FLASH 0x04 +#define BOOT_APP_FLG_RUN 0x08 #define BOOT_APP_FLG_USER0 0x80