diff --git a/companion/src/tests/conversions.cpp b/companion/src/tests/conversions.cpp index ec2db8e02..7a78ec4ee 100644 --- a/companion/src/tests/conversions.cpp +++ b/companion/src/tests/conversions.cpp @@ -26,6 +26,12 @@ TEST(Conversions, ConversionX9DPFrom22) EXPECT_EQ(80, model.mixData[0].weight); EXPECT_EQ(900, model.limitData[0].max); // -100 EXPECT_EQ(80, model.expoData[0].weight); + + EXPECT_EQ(CurveReference::CURVE_REF_CUSTOM, model.expoData[0].curve.type); + EXPECT_EQ(1, model.expoData[0].curve.value); + EXPECT_EQ(CurveReference::CURVE_REF_EXPO, model.expoData[1].curve.type); + EXPECT_EQ(20, model.expoData[1].curve.value); + EXPECT_EQ(HELI_SWASH_TYPE_120X, model.swashRingData.type); EXPECT_EQ(10, model.flightModeData[0].gvars[0]); EXPECT_STREQ("Tes", model.gvarData[0].name); @@ -48,6 +54,7 @@ TEST(Conversions, ConversionX9DPFrom23) ASSERT_EQ(true, store.load(radioData)); const GeneralSettings& settings = radioData.generalSettings; + EXPECT_EQ(8, settings.speakerVolume); EXPECT_EQ(RawSwitch(SWITCH_TYPE_TELEMETRY, 1), settings.customFn[0].swtch); EXPECT_EQ(FuncLogs, settings.customFn[0].func); EXPECT_EQ(20, settings.customFn[0].param); diff --git a/radio/src/storage/conversions/conversions_218_219.cpp b/radio/src/storage/conversions/conversions_218_219.cpp index b385f64ae..a6d50ba85 100644 --- a/radio/src/storage/conversions/conversions_218_219.cpp +++ b/radio/src/storage/conversions/conversions_218_219.cpp @@ -153,6 +153,10 @@ void convertModelData_218_to_219(ModelData &model) memmove(&newModel.expoData[i], &oldModel.expoData[i], sizeof(ExpoData_v218)); newModel.expoData[i].srcRaw = convertSource_218_to_219(newModel.expoData[i].srcRaw); // from newModel to avoid overwrite newModel.expoData[i].swtch = convertSwitch_218_to_219(newModel.expoData[i].swtch); // from newModel to avoid overwrite +#if LCD_W == 212 + newModel.expoData[i].offset = oldModel.expoData[i].offset; // 212x64: expo name has been reduced to 6 chars instead of 8 + newModel.expoData[i].curve = oldModel.expoData[i].curve; // 212x64: expo name has been reduced to 6 chars instead of 8 +#endif } for (uint8_t i=0; i