Write 'semver' tag with the current firmware version (#1695)

And remove `version`/`variant`.
This commit is contained in:
Raphael Coeffic
2022-03-20 19:18:01 +10:00
committed by GitHub
parent 76ae89d2f2
commit 610326f216
25 changed files with 69 additions and 108 deletions
+8 -8
View File
@@ -116,29 +116,29 @@ static inline void check_struct()
CHKSIZE(TrainerData, 16);
#if defined(PCBXLITES)
CHKSIZE(RadioData, 860);
CHKSIZE(RadioData, 857);
CHKSIZE(ModelData, 6161);
#elif defined(PCBXLITE)
CHKSIZE(RadioData, 858);
CHKSIZE(RadioData, 855);
CHKSIZE(ModelData, 6161);
#elif defined(RADIO_TPRO)
CHKSIZE(RadioData, 841);
CHKSIZE(RadioData, 838);
CHKSIZE(ModelData, 6186);
#elif defined(PCBX7)
CHKSIZE(RadioData, 864);
CHKSIZE(RadioData, 861);
CHKSIZE(ModelData, 6161);
#elif defined(PCBX9E)
CHKSIZE(RadioData, 954);
CHKSIZE(RadioData, 951);
CHKSIZE(ModelData, 6613);
#elif defined(PCBX9D) || defined(PCBX9DP)
CHKSIZE(RadioData, 896);
CHKSIZE(RadioData, 893);
CHKSIZE(ModelData, 6605);
#elif defined(PCBHORUS)
#if defined(PCBX10)
CHKSIZE(RadioData, 921);
CHKSIZE(RadioData, 918);
CHKSIZE(ModelData, 11025);
#else
CHKSIZE(RadioData, 903);
CHKSIZE(RadioData, 900);
CHKSIZE(ModelData, 11023);
#endif
#endif
+2 -2
View File
@@ -637,6 +637,7 @@ PACK(struct PartialModel {
});
PACK(struct ModelData {
CUST_ATTR(semver,nullptr,w_semver);
ModelHeader header;
TimerData timers[MAX_TIMERS];
uint8_t telemetryProtocol:3;
@@ -841,9 +842,8 @@ PACK(struct TrainerData {
PACK(struct RadioData {
// Real attributes
NOBACKUP(uint8_t version);
CUST_ATTR(semver,nullptr,w_semver);
CUST_ATTR(board,nullptr,w_board);
NOBACKUP(uint16_t variant SKIP);
CalibData calib[NUM_STICKS + STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS + STORAGE_NUM_MOUSE_ANALOGS] NO_IDX;
NOBACKUP(uint16_t chkSum SKIP);
N_HORUS_FIELD(int8_t currModel);
-5
View File
@@ -272,8 +272,6 @@ void setDefaultOwnerId()
void generalDefault()
{
memclear(&g_eeGeneral, sizeof(g_eeGeneral));
g_eeGeneral.version = EEPROM_VER;
g_eeGeneral.variant = EEPROM_VARIANT;
#if defined(PCBHORUS)
g_eeGeneral.blOffBright = 20;
@@ -1670,9 +1668,6 @@ void copyMinMaxToOutputs(uint8_t ch)
inline uint32_t PWR_PRESS_DURATION_MIN()
{
if (g_eeGeneral.version != EEPROM_VER)
return 200;
return (2 - g_eeGeneral.pwrOnSpeed) * 100;
}
+5 -10
View File
@@ -215,11 +215,11 @@ void eeConvertModel(int id, int version)
// TODO: error handling
}
bool eeConvert()
bool eeConvert(uint8_t start_version)
{
const char *msg = NULL;
switch (g_eeGeneral.version) {
switch (start_version) {
case 219:
msg = "EEprom Data v219";
break;
@@ -230,8 +230,6 @@ bool eeConvert()
return false;
}
int conversionVersionStart = g_eeGeneral.version;
// Information to the user and wait for key press
g_eeGeneral.backlightMode = e_backlight_mode_on;
g_eeGeneral.backlightBright = 0;
@@ -242,7 +240,8 @@ bool eeConvert()
RAISE_ALERT(STR_STORAGE_WARNING, STR_EEPROM_CONVERTING, NULL, AU_NONE);
// General Settings conversion
int version = conversionVersionStart;
int version = start_version;
(void)version;
sdCheckAndCreateDirectory(RADIO_PATH);
sdCheckAndCreateDirectory(MODELS_PATH);
@@ -259,10 +258,6 @@ bool eeConvert()
convertRadioData_220_to_221();
}
#endif
//TODO: reload from YAML
g_eeGeneral.version = EEPROM_VER;
// storageDirty(EE_GENERAL);
// storageCheck(true);
#if defined(STORAGE_MODELSLIST)
modelslist.clear();
@@ -292,7 +287,7 @@ bool eeConvert()
#else
if (eeModelExists(id)) {
#endif
eeConvertModel(id, conversionVersionStart);
eeConvertModel(id, start_version);
}
}
+1 -1
View File
@@ -23,7 +23,7 @@
void convertBinRadioData(const char * path, int version);
const char* convertBinModelData(char * filename, int version);
bool eeConvert();
bool eeConvert(uint8_t start_version);
void eeConvertModel(int id, int version);
// // Conversions 216 to 217
+13 -43
View File
@@ -793,61 +793,31 @@ uint16_t eeLoadModelData(uint8_t index)
bool eeLoadGeneral(bool allowFixes)
{
theFile.openRlc(FILE_GENERAL);
if (theFile.readRlc((uint8_t*)&g_eeGeneral, 3) == 3 && g_eeGeneral.version == EEPROM_VER) {
uint8_t versions[3];
uint16_t* variant = (uint16_t*)&versions[1];
if (theFile.readRlc(versions, 3) == 3 && versions[0] == EEPROM_VER) {
theFile.openRlc(FILE_GENERAL);
if (theFile.readRlc((uint8_t*)&g_eeGeneral, sizeof(g_eeGeneral)) <= sizeof(g_eeGeneral) && g_eeGeneral.variant == EEPROM_VARIANT) {
if (theFile.readRlc((uint8_t *)&g_eeGeneral, sizeof(g_eeGeneral)) <=
sizeof(g_eeGeneral) &&
*variant == EEPROM_VARIANT) {
return true;
}
}
#if defined(PCBX7)
if (g_eeGeneral.variant == 0) {
TRACE("Pre release EEPROM detected, variant %d instead of %d for X7 radio. Loading anyway", g_eeGeneral.variant, EEPROM_VARIANT);
g_eeGeneral.variant = EEPROM_VARIANT;
storageDirty(EE_GENERAL);
return true;
}
#endif
#if defined(PCBX9LITES)
if (g_eeGeneral.variant == 0x0800) {
TRACE("Pre release EEPROM detected, variant %d instead of %d for X9LiteS radio. Loading anyway", g_eeGeneral.variant, EEPROM_VARIANT);
g_eeGeneral.variant = EEPROM_VARIANT;
storageDirty(EE_GENERAL);
return true;
}
#endif
#if defined(RADIO_T12)
if (g_eeGeneral.variant != (EEPROM_VARIANT & 0xFFFE)) {
TRACE("EEPROM variant %d instead of %d", g_eeGeneral.variant, EEPROM_VARIANT);
return false;
}
else if (g_eeGeneral.variant != EEPROM_VARIANT && g_eeGeneral.version == 218) {
TRACE("V218 T12/X7 detected, allowing use", g_eeGeneral.variant, EEPROM_VARIANT); // Production firmware use v218 X7 variant
}
else {
TRACE("EEPROM variant %d instead of %d", g_eeGeneral.variant, EEPROM_VARIANT);
return false;
}
#elif defined(PCBTARANIS)
if (g_eeGeneral.variant != EEPROM_VARIANT) {
TRACE("EEPROM variant %d instead of %d", g_eeGeneral.variant, EEPROM_VARIANT);
return false;
}
#endif
#if defined(STORAGE_CONVERSIONS)
if (g_eeGeneral.version != EEPROM_VER) {
TRACE("EEPROM version %d instead of %d", g_eeGeneral.version, EEPROM_VER);
if (versions[0] != EEPROM_VER) {
TRACE("EEPROM version %d instead of %d", versions[0], EEPROM_VER);
if (!allowFixes)
return false; // prevent eeprom from being wiped
if (!eeConvert())
if (!eeConvert(versions[0]))
return false;
}
return true;
#else
TRACE("EEPROM version %d (%d) instead of %d (%d)", g_eeGeneral.version, g_eeGeneral.variant, EEPROM_VER, EEPROM_VARIANT);
TRACE("EEPROM version %d (%d) instead of %d (%d)", versions[0], *variant,
EEPROM_VER, EEPROM_VARIANT);
return false;
#endif
}
+1 -3
View File
@@ -123,9 +123,7 @@ const char * loadRadioSettings()
|| (*variant != EEPROM_VARIANT)) {
return "ERROR";
}
g_eeGeneral.version = versions[0];
g_eeGeneral.variant = *variant;
eeConvert();
eeConvert(versions[0]);
#else
#error "Unsupported conversion format"
#endif
@@ -24,6 +24,7 @@
#include "yaml_tree_walker.h"
#include "pulses/multi.h"
#include "stamp.h"
// Use definitions from v220 conversions as long as nothing changes
@@ -136,6 +137,12 @@ static inline void check_yaml_funcs()
#endif
}
static bool w_semver(void* user, uint8_t* data, uint32_t bitoffs,
yaml_writer_func wf, void* opaque)
{
return wf(opaque, VERSION, sizeof(VERSION)-1);
}
static bool w_board(void* user, uint8_t* data, uint32_t bitoffs,
yaml_writer_func wf, void* opaque)
{
@@ -362,9 +362,8 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -830,6 +829,7 @@ static const struct YamlNode struct_TopBarPersistentData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -333,9 +333,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -799,6 +798,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -333,9 +333,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -799,6 +798,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -333,9 +333,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -799,6 +798,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -341,9 +341,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -805,6 +804,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -333,9 +333,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -799,6 +798,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -385,9 +385,8 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 17, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_UNSIGNED( "vBatWarn", 8 ),
@@ -851,6 +850,7 @@ static const struct YamlNode struct_TopBarPersistentData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -383,9 +383,8 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_UNSIGNED( "vBatWarn", 8 ),
@@ -849,6 +848,7 @@ static const struct YamlNode struct_TopBarPersistentData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -333,9 +333,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -799,6 +798,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -340,9 +340,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -812,6 +811,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 192, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -379,9 +379,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -851,6 +850,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 192, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -320,9 +320,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -784,6 +783,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -328,9 +328,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -794,6 +793,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -325,9 +325,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -791,6 +790,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -327,9 +327,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -795,6 +794,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
@@ -333,9 +333,8 @@ static const struct YamlNode struct_string_24[] = {
YAML_END
};
static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "version", 8 ),
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_CUSTOM("board",nullptr,w_board),
YAML_PADDING( 16 ),
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
YAML_PADDING( 16 ),
YAML_SIGNED( "currModel", 8 ),
@@ -799,6 +798,7 @@ static const struct YamlNode struct_TelemetryScreenData[] = {
YAML_END
};
static const struct YamlNode struct_ModelData[] = {
YAML_CUSTOM("semver",nullptr,w_semver),
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
YAML_UNSIGNED( "telemetryProtocol", 3 ),
-4
View File
@@ -310,8 +310,6 @@ TEST(Conversions, ConversionX10From23)
convertBinModelData(modelname, 219);
loadModel(modelname);
EXPECT_EQ(221, g_eeGeneral.version);
EXPECT_EQ(100, g_eeGeneral.calib[CALIBRATED_SLIDER_REAR_LEFT].spanNeg);
EXPECT_EQ(500, g_eeGeneral.calib[CALIBRATED_SLIDER_REAR_LEFT].mid);
EXPECT_EQ(900, g_eeGeneral.calib[CALIBRATED_SLIDER_REAR_LEFT].spanPos);
@@ -384,7 +382,6 @@ TEST(Conversions, ConversionX12SFrom23)
convertBinModelData(modelname, 219);
loadModel(modelname);
EXPECT_EQ(221, g_eeGeneral.version);
EXPECT_EQ(-30, g_eeGeneral.vBatMin);
EXPECT_EQ(8, g_eeGeneral.speakerVolume);
EXPECT_STRNEQ("en", g_eeGeneral.ttsLanguage);
@@ -449,7 +446,6 @@ TEST(Conversions, ConversionTX16SFrom25)
convertBinModelData(modelname, 220);
loadModel(modelname);
EXPECT_EQ(221, g_eeGeneral.version);
EXPECT_EQ(-23, g_eeGeneral.vBatMin);
EXPECT_EQ(0, g_eeGeneral.speakerVolume);
EXPECT_STRNEQ("en", g_eeGeneral.ttsLanguage);