mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-20 14:55:09 +03:00
Code moved
This commit is contained in:
parent
896ff1e386
commit
96aa54ac77
3 changed files with 21 additions and 38 deletions
|
@ -356,7 +356,7 @@ int menuFlashFile(uint32_t index, uint8_t event)
|
|||
fr = openFirmwareFile(index);
|
||||
fr = f_close(&FlashFile);
|
||||
Valid = 1;
|
||||
if (isFirmwareStart(Block_buffer) == 0) {
|
||||
if (!isFirmwareStart(Block_buffer)) {
|
||||
Valid = 2;
|
||||
}
|
||||
}
|
||||
|
@ -648,6 +648,13 @@ int main()
|
|||
// Commit to flashing
|
||||
uint32_t blockOffset = 0;
|
||||
lcd_putsLeft(4*FH, "\032Loading...");
|
||||
|
||||
if (firmwareAddress == FIRMWARE_ADDRESS + BOOTLOADER_SIZE) {
|
||||
if (!isFirmwareStart(Block_buffer)) {
|
||||
state = ST_FLASH_DONE;
|
||||
}
|
||||
}
|
||||
|
||||
while (BlockCount) {
|
||||
writeFlash((uint32_t *)firmwareAddress, &Block_buffer[blockOffset]);
|
||||
blockOffset += FLASH_PAGESIZE/4; // 32-bit words
|
||||
|
@ -659,6 +666,7 @@ int main()
|
|||
BlockCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
firmwareWritten += 4; // 4K blocks
|
||||
|
||||
lcd_rect( 3, 6*FH+4, 204, 7);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue