diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index 7b750487e..63eaefd9d 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -432,6 +432,11 @@ When called without parameters, it will only return the status of the output buf static int luaSportTelemetryPush(lua_State * L) { + if (telemetryProtocol != PROTOCOL_TELEMETRY_FRSKY_SPORT) { + lua_pushboolean(L, false); + return 1; + } + if (lua_gettop(L) == 0) { lua_pushboolean(L, outputTelemetryBuffer.isAvailable()); return 1; @@ -629,6 +634,11 @@ When called without parameters, it will only return the status of the output buf */ static int luaCrossfireTelemetryPush(lua_State * L) { + if (telemetryProtocol != PROTOCOL_TELEMETRY_CROSSFIRE) { + lua_pushboolean(L, false); + return 1; + } + if (lua_gettop(L) == 0) { lua_pushboolean(L, outputTelemetryBuffer.isAvailable()); }