mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 03:19:53 +03:00
Remove carryTrim
This commit is contained in:
parent
5b3e1288a2
commit
a54cfeca75
1 changed files with 2 additions and 7 deletions
|
@ -531,11 +531,10 @@ Return input data for given input and line number
|
||||||
* `switch` (number) input switch index
|
* `switch` (number) input switch index
|
||||||
* `curveType` (number) curve type (function, expo, custom curve)
|
* `curveType` (number) curve type (function, expo, custom curve)
|
||||||
* `curveValue` (number) curve index
|
* `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
|
* 'trimSource' (number) a positive number representing trim source
|
||||||
* 'flightModes' (number) bit-mask of active flight modes
|
* '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)
|
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, "switch", expo->swtch);
|
||||||
lua_pushtableinteger(L, "curveType", expo->curve.type);
|
lua_pushtableinteger(L, "curveType", expo->curve.type);
|
||||||
lua_pushtableinteger(L, "curveValue", expo->curve.value);
|
lua_pushtableinteger(L, "curveValue", expo->curve.value);
|
||||||
lua_pushtableinteger(L, "carryTrim", expo->trimSource);
|
|
||||||
lua_pushtableinteger(L, "trimSource", - expo->trimSource);
|
lua_pushtableinteger(L, "trimSource", - expo->trimSource);
|
||||||
lua_pushtableinteger(L, "flightModes", expo->flightModes);
|
lua_pushtableinteger(L, "flightModes", expo->flightModes);
|
||||||
}
|
}
|
||||||
|
@ -575,7 +573,7 @@ Insert an Input at specified line
|
||||||
|
|
||||||
@param value (table) input data, see model.getInput()
|
@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)
|
static int luaModelInsertInput(lua_State *L)
|
||||||
{
|
{
|
||||||
|
@ -620,9 +618,6 @@ static int luaModelInsertInput(lua_State *L)
|
||||||
else if (!strcmp(key, "curveValue")) {
|
else if (!strcmp(key, "curveValue")) {
|
||||||
expo->curve.value = luaL_checkinteger(L, -1);
|
expo->curve.value = luaL_checkinteger(L, -1);
|
||||||
}
|
}
|
||||||
else if (!strcmp(key, "carryTrim")) { // deprecated
|
|
||||||
expo->trimSource = luaL_checkinteger(L, -1);
|
|
||||||
}
|
|
||||||
else if (!strcmp(key, "trimSource")) {
|
else if (!strcmp(key, "trimSource")) {
|
||||||
expo->trimSource = - luaL_checkinteger(L, -1);
|
expo->trimSource = - luaL_checkinteger(L, -1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue