Progress screen refactoring
This commit is contained in:
@@ -867,7 +867,7 @@ void eeDeleteModel(uint8_t idx)
|
||||
#if defined(SDCARD)
|
||||
void eepromBackup()
|
||||
{
|
||||
char filename[60];
|
||||
char path[60];
|
||||
uint8_t buffer[1024];
|
||||
FIL file;
|
||||
|
||||
@@ -884,20 +884,20 @@ void eepromBackup()
|
||||
}
|
||||
|
||||
// prepare the filename...
|
||||
char * tmp = strAppend(filename, EEPROMS_PATH "/eeprom");
|
||||
char * tmp = strAppend(path, EEPROMS_PATH "/eeprom");
|
||||
#if defined(RTCLOCK)
|
||||
tmp = strAppendDate(tmp, true);
|
||||
#endif
|
||||
strAppend(tmp, EEPROM_EXT);
|
||||
|
||||
// open the file for writing...
|
||||
f_open(&file, filename, FA_WRITE | FA_CREATE_ALWAYS);
|
||||
f_open(&file, path, FA_WRITE | FA_CREATE_ALWAYS);
|
||||
|
||||
for (int i=0; i<EEPROM_SIZE; i+=1024) {
|
||||
UINT count;
|
||||
eepromReadBlock(buffer, i, 1024);
|
||||
f_write(&file, buffer, 1024, &count);
|
||||
drawProgressBar(STR_WRITING, i, EEPROM_SIZE);
|
||||
drawProgressScreen("EEPROM Backup", STR_WRITING, i, EEPROM_SIZE);
|
||||
#if defined(SIMU)
|
||||
// add an artificial delay and check for simu quit
|
||||
if (SIMU_SLEEP_OR_EXIT_MS(100))
|
||||
|
||||
Reference in New Issue
Block a user