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.
This commit is contained in:
Marek Bel 2018-06-26 20:12:09 +02:00
parent 65880fac67
commit 3248edc1ca
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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