From a84427e2604c15c5619cc2112ab852dea11e0e93 Mon Sep 17 00:00:00 2001 From: bsongis Date: Tue, 8 Apr 2014 22:10:12 +0200 Subject: [PATCH] UnlockFlash called only one time (or it reboots at the 2nd time) --- radio/src/gui/menu_general.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/menu_general.cpp b/radio/src/gui/menu_general.cpp index a081ae2f8..44906f86d 100644 --- a/radio/src/gui/menu_general.cpp +++ b/radio/src/gui/menu_general.cpp @@ -694,7 +694,13 @@ void flashBootloader(const char * filename) UINT count; lcd_rect(3, 6*FH+4, 204, 7); watchdogSetTimeout(1000/*10s*/); - unlockFlash(); + + static uint8_t unlocked = 0; + if (!unlocked) { + unlocked = 1; + unlockFlash(); + } + for (int i=0; i