mirror of
https://github.com/opentx/opentx.git
synced 2025-07-22 07:45:14 +03:00
Fix: former Lua telemetry fields were not exported correctly (tx-voltage, clock and timers1-3)
This commit is contained in:
parent
60c925a721
commit
34090a1d3e
3 changed files with 9 additions and 5 deletions
|
@ -9,6 +9,7 @@
|
|||
<li>Fixed: Playing two background sounds at once causes sound to stop (<a href=https://github.com/opentx/opentx/issues/2704>#2704</a>)</li>
|
||||
<li>Several fixes to the SD card manager menu (<a href=https://github.com/opentx/opentx/issues/2623>#2623</a>)</li>
|
||||
<li>Fixed the difference between top and main LCD TX battery bars on 9Xe (<a href=https://github.com/opentx/opentx/issues/2671>#2671</a>)</li>
|
||||
<li>Several Lua getValue() fields were not exported correctly (tx-voltage, clock and timers1-3)</li>
|
||||
</ul>
|
||||
|
||||
[Sky9x / 9XR-PRO]
|
||||
|
|
|
@ -149,6 +149,9 @@ static void luaGetValueAndPush(int src)
|
|||
lua_pushinteger(L, (int)0);
|
||||
}
|
||||
}
|
||||
else if (src == MIXSRC_TX_VOLTAGE) {
|
||||
lua_pushnumber(L, float(value)/10.0);
|
||||
}
|
||||
else {
|
||||
lua_pushinteger(L, value);
|
||||
}
|
||||
|
|
|
@ -1922,17 +1922,17 @@ enum MixSources {
|
|||
MIXSRC_LAST_GVAR = MIXSRC_FIRST_GVAR+MAX_GVARS-1,
|
||||
|
||||
#if defined(CPUARM)
|
||||
MIXSRC_TX_VOLTAGE, LUA_EXPORT_TELEMETRY("tx-voltage", "Transmitter battery voltage [volts]")
|
||||
MIXSRC_TX_TIME, LUA_EXPORT_TELEMETRY("clock", "RTC clock [minutes from midnight]")
|
||||
MIXSRC_TX_VOLTAGE, LUA_EXPORT("tx-voltage", "Transmitter battery voltage [volts]")
|
||||
MIXSRC_TX_TIME, LUA_EXPORT("clock", "RTC clock [minutes from midnight]")
|
||||
MIXSRC_RESERVE1,
|
||||
MIXSRC_RESERVE2,
|
||||
MIXSRC_RESERVE3,
|
||||
MIXSRC_RESERVE4,
|
||||
MIXSRC_RESERVE5,
|
||||
MIXSRC_FIRST_TIMER,
|
||||
MIXSRC_TIMER1 = MIXSRC_FIRST_TIMER, LUA_EXPORT_TELEMETRY("timer1", "Timer 1 value [seconds]")
|
||||
MIXSRC_TIMER2, LUA_EXPORT_TELEMETRY("timer2", "Timer 2 value [seconds]")
|
||||
MIXSRC_TIMER3, LUA_EXPORT_TELEMETRY("timer3", "Timer 3 value [seconds]")
|
||||
MIXSRC_TIMER1 = MIXSRC_FIRST_TIMER, LUA_EXPORT("timer1", "Timer 1 value [seconds]")
|
||||
MIXSRC_TIMER2, LUA_EXPORT("timer2", "Timer 2 value [seconds]")
|
||||
MIXSRC_TIMER3, LUA_EXPORT("timer3", "Timer 3 value [seconds]")
|
||||
MIXSRC_LAST_TIMER = MIXSRC_TIMER3,
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue