mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 16:55:15 +03:00
Update boot.cpp
This commit is contained in:
parent
de9e2a50bc
commit
ff2eb36887
1 changed files with 3 additions and 3 deletions
|
@ -278,7 +278,7 @@ void hw_delay(uint16_t time)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8_t *cpystr(uint8_t *dest, uint8_t *source)
|
char * cpystr(char * dest, const char * source)
|
||||||
{
|
{
|
||||||
while ((*dest++ = *source++))
|
while ((*dest++ = *source++))
|
||||||
;
|
;
|
||||||
|
@ -297,7 +297,7 @@ FRESULT readBinDir(DIR *dj, FILINFO *fno)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*fno->lfname == 0) {
|
if (*fno->lfname == 0) {
|
||||||
cpystr((uint8_t *) fno->lfname, (uint8_t *) fno->fname); // Copy 8.3 name
|
cpystr(fno->lfname, fno->fname); // Copy 8.3 name
|
||||||
}
|
}
|
||||||
int32_t len = strlen(fno->lfname) - 4;
|
int32_t len = strlen(fno->lfname) - 4;
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
|
@ -360,7 +360,7 @@ const char *getBinaryPath()
|
||||||
FRESULT openBinaryFile(uint32_t index)
|
FRESULT openBinaryFile(uint32_t index)
|
||||||
{
|
{
|
||||||
TCHAR filename[60];
|
TCHAR filename[60];
|
||||||
cpystr(cpystr(cpystr((uint8_t *)filename, (uint8_t *)getBinaryPath()), (uint8_t *)"/"), (uint8_t *)Filenames[index]);
|
cpystr(cpystr(cpystr(filename, getBinaryPath()), "/"), Filenames[index]);
|
||||||
f_open(&FlashFile, filename, FA_READ);
|
f_open(&FlashFile, filename, FA_READ);
|
||||||
if (memoryType == MEM_FLASH)
|
if (memoryType == MEM_FLASH)
|
||||||
f_lseek(&FlashFile, BOOTLOADER_SIZE);
|
f_lseek(&FlashFile, BOOTLOADER_SIZE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue