1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Merge pull request #6675 from opentx/3djc/fix-crossfire-lua

2.3 Fix BF scripts
This commit is contained in:
3djc 2019-08-28 11:18:58 +02:00 committed by GitHub
commit 2546967df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());
}