X10 extra switches sticks (#6423)

[X10] 2 extra sticks switches + 2 extra pots
This commit is contained in:
Bertrand Songis
2019-05-17 20:42:41 +02:00
committed by GitHub
parent 11cb2ea29b
commit 794fe32006
27 changed files with 390 additions and 166 deletions
+10 -6
View File
@@ -21,10 +21,8 @@
#include "opentx.h"
#include "conversions.h"
void convertModelData(int id, int version)
void convertModelData(int version)
{
eeLoadModelData(id);
#if EEPROM_CONVERSIONS < 217
if (version == 216) {
version = 217;
@@ -45,7 +43,13 @@ void convertModelData(int id, int version)
convertModelData_218_to_219(g_model);
}
#endif
}
#if defined(EEPROM)
void eeConvertModel(int id, int version)
{
eeLoadModelData(id);
convertModelData(version);
uint8_t currModel = g_eeGeneral.currModel;
g_eeGeneral.currModel = id;
storageDirty(EE_MODEL);
@@ -106,8 +110,7 @@ bool eeConvert()
#if EEPROM_CONVERSIONS < 219
if (version == 218) {
version = 219;
g_eeGeneral.version = 219;
// no conversion needed for now
convertRadioData_218_to_219(g_eeGeneral);
}
#endif
@@ -131,9 +134,10 @@ bool eeConvert()
#endif
lcdRefresh();
if (eeModelExists(id)) {
convertModelData(id, conversionVersionStart);
eeConvertModel(id, conversionVersionStart);
}
}
return true;
}
#endif