mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 21:05:26 +03:00
Correctly respond to luaSportTelemetryPush(), luaCrossfireTelemetryPush() with L=0 (fix BF scripts)
This commit is contained in:
parent
3234d52864
commit
b836c947c2
1 changed files with 2 additions and 2 deletions
|
@ -433,7 +433,7 @@ When called without parameters, it will only return the status of the output buf
|
|||
static int luaSportTelemetryPush(lua_State * L)
|
||||
{
|
||||
if (lua_gettop(L) == 0) {
|
||||
lua_pushboolean(L, outputTelemetryBuffer.isAvailable());
|
||||
lua_pushboolean(L, telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT ? outputTelemetryBuffer.isAvailable() : false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -630,7 +630,7 @@ When called without parameters, it will only return the status of the output buf
|
|||
static int luaCrossfireTelemetryPush(lua_State * L)
|
||||
{
|
||||
if (lua_gettop(L) == 0) {
|
||||
lua_pushboolean(L, outputTelemetryBuffer.isAvailable());
|
||||
lua_pushboolean(L, telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE ? outputTelemetryBuffer.isAvailable() : false);
|
||||
}
|
||||
else if (outputTelemetryBuffer.isAvailable()) {
|
||||
uint8_t command = luaL_checkunsigned(L, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue