1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 03:19:53 +03:00

Remove carryTrim

This commit is contained in:
3djc 2023-01-11 09:33:57 +01:00
parent 5b3e1288a2
commit a54cfeca75

View file

@ -531,11 +531,10 @@ Return input data for given input and line number
* `switch` (number) input switch index
* `curveType` (number) curve type (function, expo, custom curve)
* `curveValue` (number) curve index
* `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource)
* 'trimSource' (number) a positive number representing trim source
* 'flightModes' (number) bit-mask of active flight modes
@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, flighmode reworked in 2.3.11, carryTrim replaced by trimSource in 2.3.16
@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, flighmode reworked in 2.3.11, broken carryTrim replaced by trimSource in 2.3.16
*/
static int luaModelGetInput(lua_State *L)
{
@ -554,7 +553,6 @@ static int luaModelGetInput(lua_State *L)
lua_pushtableinteger(L, "switch", expo->swtch);
lua_pushtableinteger(L, "curveType", expo->curve.type);
lua_pushtableinteger(L, "curveValue", expo->curve.value);
lua_pushtableinteger(L, "carryTrim", expo->trimSource);
lua_pushtableinteger(L, "trimSource", - expo->trimSource);
lua_pushtableinteger(L, "flightModes", expo->flightModes);
}
@ -575,7 +573,7 @@ Insert an Input at specified line
@param value (table) input data, see model.getInput()
@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10
@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, broken carryTrim replaced by trimSource in 2.3.16
*/
static int luaModelInsertInput(lua_State *L)
{
@ -620,9 +618,6 @@ static int luaModelInsertInput(lua_State *L)
else if (!strcmp(key, "curveValue")) {
expo->curve.value = luaL_checkinteger(L, -1);
}
else if (!strcmp(key, "carryTrim")) { // deprecated
expo->trimSource = luaL_checkinteger(L, -1);
}
else if (!strcmp(key, "trimSource")) {
expo->trimSource = - luaL_checkinteger(L, -1);
}