1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 20:35:17 +03:00

Fix setCurve not probably working for custom curves

ypoints used for x instead of xpoints
This commit is contained in:
Arne Schwabe 2017-07-01 01:55:31 +02:00
parent 779aecfbee
commit 1ae8e40a3f

View file

@ -961,7 +961,7 @@ static int luaModelSetCurve(lua_State *L)
if (newCurveData.type == CURVE_TYPE_CUSTOM) {
// The rest of the points are checked by the monotic condition
// The rest of the points are checked by the monotonic condition
for (unsigned int i=numPoints; i < sizeof(xPoints);i++)
{
if (xPoints[i] != -127)
@ -1031,7 +1031,7 @@ static int luaModelSetCurve(lua_State *L)
if (destCurveData.type == CURVE_TYPE_CUSTOM) {
for (int i = 1; i < destCurveData.points + 4; i++) {
*point++ = yPoints[i];
*point++ = xPoints[i];
}
}
storageDirty(EE_MODEL);