Skip to content

Commit

Permalink
save and restore prev filenum during firmware upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMassot committed Aug 23, 2024
1 parent 00836ee commit 837b17a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions upgrade/upgrade.tbs
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,13 @@ function device_firmware_upload_async(source as PL_FW_UPG_SOURCE, number as byte

device_firmware_init(source, number) 'Move parameters below into firmware init
#IFDEF FIRMWARE_UPGRADE_FILENAME
dim prev_num as byte=fd.filenum
dim fd_status as pl_fd_status_codes=fd.delete(FIRMWARE_UPGRADE_FILENAME)
fd_status=fd.create(FIRMWARE_UPGRADE_FILENAME)
fd.filenum=filenum_open("UPG",FIRMWARE_UPGRADE_FILENAME,fd_status)
#ENDIF
device_firmware_upload_async=device_firmware_upload_update()
fd.filenum=prev_num

end function

Expand Down

0 comments on commit 837b17a

Please sign in to comment.