From 57d53abd6eb18da92bb2231ee5d4c9fb3be78186 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 13 Nov 2017 22:18:07 +0100 Subject: [PATCH] Fixes #5300 (#5353) --- radio/src/storage/eeprom_conversions.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/radio/src/storage/eeprom_conversions.cpp b/radio/src/storage/eeprom_conversions.cpp index 99fda7637..fed5d5bc0 100644 --- a/radio/src/storage/eeprom_conversions.cpp +++ b/radio/src/storage/eeprom_conversions.cpp @@ -585,6 +585,12 @@ PACK(typedef struct { }) ModelData_v216; PACK(typedef struct { + char name[6]; + uint8_t popup:1; + uint8_t spare:7; +}) GVarData_v217; + +PACK(typedef struct { ModelHeader header; TimerData_v217 timers[MAX_TIMERS]; ARM_FIELD(uint8_t telemetryProtocol:3) @@ -616,7 +622,7 @@ PACK(typedef struct { swarnstate_t switchWarningState; swarnenable_t switchWarningEnable; - GVarData gvars[MAX_GVARS]; + GVarData_v217 gvars[MAX_GVARS]; FrSkyTelemetryData frsky; RssiAlarmData rssiAlarms; @@ -1185,7 +1191,10 @@ void ConvertModel_217_to_218(ModelData & model) newModel.thrTraceSrc = oldModel.thrTraceSrc; newModel.switchWarningState = oldModel.switchWarningState; newModel.switchWarningEnable = oldModel.switchWarningEnable; - memcpy(newModel.gvars, oldModel.gvars, sizeof(newModel.gvars)); + for (int i=0; i> (2*i)) & 0x03) == TELEMETRY_SCREEN_TYPE_VALUES) { -- 2.11.4.GIT