Fix model names and indexes on storage creation

This commit is contained in:
Raphael Coeffic
2021-11-10 11:07:03 +01:00
parent 3717e37e3f
commit bcdb9bd311
5 changed files with 25 additions and 7 deletions
+5 -1
View File
@@ -135,7 +135,11 @@ void setModelDefaults(uint8_t id)
setVendorSpecificModelDefaults(id);
strAppendUnsigned(strAppend(g_model.header.name, STR_MODEL), id + 1, 2);
#if !defined(STORAGE_MODELSLIST)
// EEPROM model indexes starting with 0
id++;
#endif
strAppendUnsigned(strAppend(g_model.header.name, STR_MODEL), id, 2);
#if defined(LUA) && defined(PCBTARANIS) // Horus uses menuModelWizard() for wizard
if (isFileAvailable(WIZARD_PATH "/" WIZARD_NAME)) {