1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

Vario value accessible in Lua scripts using getValue("vario")

This commit is contained in:
bsongis 2014-06-01 18:17:21 +02:00
parent a5dea34415
commit 634c327ac6

View file

@ -157,6 +157,10 @@ static int luaGetValue(lua_State *L)
lua_pushnumber(L, double(frskyData.hub.baroAltitude)/100);
return 1;
}
else if (!strcmp(what, "vario")) {
lua_pushnumber(L, double(frskyData.hub.varioSpeed)/100);
return 1;
}
else if (frskyData.hub.gpsFix) {
if (!strcmp(what, "latitude")) {
lua_pushnumber(L, gpsToDouble(frskyData.hub.gpsLatitudeNS=='S', frskyData.hub.gpsLatitude_bp, frskyData.hub.gpsLatitude_ap));