mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 11:29:51 +03:00
LUA trimSource is now a positive value
This commit is contained in:
parent
29037d444d
commit
5b3e1288a2
1 changed files with 4 additions and 4 deletions
|
@ -531,8 +531,8 @@ 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
|
||||
* 'trimSource' (number) a NEGATIVE number representing trim source
|
||||
* `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
|
||||
|
@ -555,7 +555,7 @@ static int luaModelGetInput(lua_State *L)
|
|||
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, "trimSource", - expo->trimSource);
|
||||
lua_pushtableinteger(L, "flightModes", expo->flightModes);
|
||||
}
|
||||
else {
|
||||
|
@ -624,7 +624,7 @@ static int luaModelInsertInput(lua_State *L)
|
|||
expo->trimSource = luaL_checkinteger(L, -1);
|
||||
}
|
||||
else if (!strcmp(key, "trimSource")) {
|
||||
expo->trimSource = luaL_checkinteger(L, -1);
|
||||
expo->trimSource = - luaL_checkinteger(L, -1);
|
||||
}
|
||||
else if (!strcmp(key, "flightModes")) {
|
||||
expo->flightModes = luaL_checkinteger(L, -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue