fix: Disable LUA GV funcs if GVARS=NO build (#1645)
Compile option breakage from #1602
This commit is contained in:
@@ -1487,6 +1487,7 @@ static int luaModelSetOutput(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(GVARS)
|
||||||
/*luadoc
|
/*luadoc
|
||||||
@function model.getGlobalVariable(index, flight_mode)
|
@function model.getGlobalVariable(index, flight_mode)
|
||||||
|
|
||||||
@@ -1547,6 +1548,7 @@ static int luaModelSetGlobalVariable(lua_State *L)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*luadoc
|
/*luadoc
|
||||||
@function model.getSensor(sensor)
|
@function model.getSensor(sensor)
|
||||||
@@ -1644,8 +1646,10 @@ const luaL_Reg modelLib[] = {
|
|||||||
{ "setCurve", luaModelSetCurve },
|
{ "setCurve", luaModelSetCurve },
|
||||||
{ "getOutput", luaModelGetOutput },
|
{ "getOutput", luaModelGetOutput },
|
||||||
{ "setOutput", luaModelSetOutput },
|
{ "setOutput", luaModelSetOutput },
|
||||||
|
#if defined (GVARS)
|
||||||
{ "getGlobalVariable", luaModelGetGlobalVariable },
|
{ "getGlobalVariable", luaModelGetGlobalVariable },
|
||||||
{ "setGlobalVariable", luaModelSetGlobalVariable },
|
{ "setGlobalVariable", luaModelSetGlobalVariable },
|
||||||
|
#endif
|
||||||
{ "getSensor", luaModelGetSensor },
|
{ "getSensor", luaModelGetSensor },
|
||||||
{ "resetSensor", luaModelResetSensor },
|
{ "resetSensor", luaModelResetSensor },
|
||||||
{ NULL, NULL } /* sentinel */
|
{ NULL, NULL } /* sentinel */
|
||||||
|
|||||||
Reference in New Issue
Block a user