1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Issue #857 - Offset rounding in conversion fixed

This commit is contained in:
bsongis 2014-03-26 08:53:20 +01:00
parent 95c8f460a3
commit 1328893f5d

View file

@ -472,7 +472,7 @@ void ConvertModel_215_to_216(ModelData &model)
else if (mix.weight >= 507)
mix.weight = mix.weight - 512 + 4096;
else
mix.offset = mix.offset * mix.weight / 100;
mix.offset = ((mix.offset * mix.weight) + 50) / 100;
}
for (uint8_t i=0; i<32; i++) {
g_model.limitData[i].min = 10 * oldModel.limitData[i].min;