Lua telemetry screens had been shifted in d2df4af, and start screen still wasn't the intended one.

Now we've got lua first, custom second, then the voltage and end of flight default screens. Makes sense, so that the most potentially powerful type is first.
This commit is contained in:
Andre Bernet
2014-06-26 18:54:27 +02:00
parent 927a9b9f38
commit 54902a5a00
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1284,7 +1284,7 @@ bool isTelemetryScriptAvailable(uint8_t index)
{
for (int i=0; i<luaScriptsCount; i++) {
ScriptInternalData & sid = scriptInternalData[i];
if (sid.reference == SCRIPT_TELEMETRY_FIRST+index) {
if (sid.reference == SCRIPT_TELEMETRY_FIRST+index+1) {
return true;
}
}
@@ -1497,7 +1497,7 @@ void luaTask(uint8_t evt)
#if defined(SIMU) || defined(DEBUG)
filename = "[telem]";
#endif
if (g_menuStack[0]==menuTelemetryFrsky && sid.reference==SCRIPT_TELEMETRY_FIRST+s_frsky_view) {
if (g_menuStack[0]==menuTelemetryFrsky && sid.reference==SCRIPT_TELEMETRY_FIRST+s_frsky_view+1) {
lua_rawgeti(L, LUA_REGISTRYINDEX, sid.run);
lua_pushinteger(L, evt);
inputsCount = 1;