mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 17:55:19 +03:00
UnlockFlash called only one time (or it reboots at the 2nd time)
This commit is contained in:
parent
31183cb840
commit
a84427e260
1 changed files with 7 additions and 1 deletions
|
@ -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<BOOTLOADER_SIZE; i+=1024) {
|
||||
if (f_read(&file, buffer, 1024, &count) != FR_OK || count != 1024) {
|
||||
// TODO popup error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue