Temporary commit for X10 conversions fixes

This commit is contained in:
Bertrand Songis
2019-08-23 14:21:02 +02:00
parent 6794212ada
commit a9255e802a
12 changed files with 95 additions and 25 deletions
@@ -21,8 +21,36 @@
#include "opentx.h"
#include "conversions.h"
void convertRadioData(int version)
{
TRACE("convertRadioData(%d)", version);
#if EEPROM_CONVERSIONS < 217
if (version == 216) {
version = 217;
convertRadioData_216_to_217(g_eeGeneral);
}
#endif
#if EEPROM_CONVERSIONS < 218
if (version == 217) {
version = 218;
convertRadioData_217_to_218(g_eeGeneral);
}
#endif
#if EEPROM_CONVERSIONS < 219
if (version == 218) {
version = 219;
convertRadioData_218_to_219(g_eeGeneral);
}
#endif
}
void convertModelData(int version)
{
TRACE("convertModelData(%d)", version);
#if EEPROM_CONVERSIONS < 217
if (version == 216) {
version = 217;
@@ -18,6 +18,7 @@
* GNU General Public License for more details.
*/
void convertRadioData(int version);
void convertModelData(int version);
bool eeConvert();
@@ -309,6 +309,8 @@ void convertModelData_218_to_219(ModelData &model)
void convertRadioData_218_to_219(RadioData & settings)
{
TRACE("Radio conversion from v218 to v219");
settings.version = 219;
settings.variant = EEPROM_VARIANT;
@@ -554,9 +554,9 @@ PACK(struct RadioData_v218 {
int8_t timezone:5;
uint8_t adjustRTC:1;
uint8_t inactivityTimer;
uint8_t telemetryBaudrate:3;
int8_t splashMode:3;
int8_t hapticMode:2;
int8_t spare2:3;
int8_t switchesDelay;
uint8_t lightAutoOff;
uint8_t templateSetup; // RETA order for receiver channels