mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +03:00
Improvement
This commit is contained in:
parent
b836c947c2
commit
4787b89b87
1 changed files with 12 additions and 2 deletions
|
@ -432,8 +432,13 @@ 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, telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT ? outputTelemetryBuffer.isAvailable() : false);
|
||||
lua_pushboolean(L, outputTelemetryBuffer.isAvailable());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -629,8 +634,13 @@ 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, telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE ? outputTelemetryBuffer.isAvailable() : false);
|
||||
lua_pushboolean(L, outputTelemetryBuffer.isAvailable());
|
||||
}
|
||||
else if (outputTelemetryBuffer.isAvailable()) {
|
||||
uint8_t command = luaL_checkunsigned(L, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue