Fix models list loading

Resolves #218
This commit is contained in:
Raphael Coeffic
2021-06-15 11:59:52 +02:00
parent db088167c3
commit 5471b233f2
2 changed files with 7 additions and 4 deletions
@@ -75,7 +75,10 @@ void convertRadioData(int version)
#if defined(SIMU)
RTOS_WAIT_MS(200);
#endif
// Load models list before converting
modelslist.load();
const char* error = nullptr;
for (auto category_ptr : modelslist.getCategories()) {
for (auto model_ptr : *category_ptr) {
+3 -3
View File
@@ -149,9 +149,6 @@ void storageReadAll()
// it's being reloaded after USB connection
modelslist.clear();
// and reload the list
modelslist.load();
if (loadRadioSettings() != nullptr) {
storageEraseAll(true);
}
@@ -163,6 +160,9 @@ void storageReadAll()
}
}
// and reload the list
modelslist.load();
// Current model filename is empty...
// Let's fix it!
if (strlen(g_eeGeneral.currModelFilename) == 0) {