mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 12:25:12 +03:00
Fix setCurve not probably working for custom curves
ypoints used for x instead of xpoints
This commit is contained in:
parent
779aecfbee
commit
1ae8e40a3f
1 changed files with 2 additions and 2 deletions
|
@ -961,7 +961,7 @@ static int luaModelSetCurve(lua_State *L)
|
||||||
|
|
||||||
if (newCurveData.type == CURVE_TYPE_CUSTOM) {
|
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++)
|
for (unsigned int i=numPoints; i < sizeof(xPoints);i++)
|
||||||
{
|
{
|
||||||
if (xPoints[i] != -127)
|
if (xPoints[i] != -127)
|
||||||
|
@ -1031,7 +1031,7 @@ static int luaModelSetCurve(lua_State *L)
|
||||||
|
|
||||||
if (destCurveData.type == CURVE_TYPE_CUSTOM) {
|
if (destCurveData.type == CURVE_TYPE_CUSTOM) {
|
||||||
for (int i = 1; i < destCurveData.points + 4; i++) {
|
for (int i = 1; i < destCurveData.points + 4; i++) {
|
||||||
*point++ = yPoints[i];
|
*point++ = xPoints[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
storageDirty(EE_MODEL);
|
storageDirty(EE_MODEL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue