mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 04:15:26 +03:00
SPORT telemetry push fix (part 2)
This commit is contained in:
parent
efd97c1637
commit
a6424f39c6
1 changed files with 12 additions and 0 deletions
|
@ -463,7 +463,18 @@ static int luaSportTelemetryPush(lua_State * L)
|
|||
packet.dataId = dataId;
|
||||
packet.value = luaL_checkunsigned(L, 4);
|
||||
outputTelemetryBuffer.pushSportPacketWithBytestuffing(packet);
|
||||
#if defined(PXX2)
|
||||
uint8_t destination = (IS_INTERNAL_MODULE_ON() ? INTERNAL_MODULE : EXTERNAL_MODULE);
|
||||
|
||||
if (isModulePXX2(destination)) {
|
||||
outputTelemetryBuffer.setDestination(destination << 2);
|
||||
}
|
||||
else {
|
||||
outputTelemetryBuffer.setDestination(TELEMETRY_ENDPOINT_SPORT);
|
||||
}
|
||||
#else
|
||||
outputTelemetryBuffer.setDestination(TELEMETRY_ENDPOINT_SPORT);
|
||||
#endif
|
||||
lua_pushboolean(L, true);
|
||||
return 1;
|
||||
}
|
||||
|
@ -497,6 +508,7 @@ When called without parameters, it will only return the status of the output buf
|
|||
@retval boolean data queued in output buffer or not.
|
||||
|
||||
@status current Introduced in 2.3
|
||||
|
||||
*/
|
||||
|
||||
static int luaAccessTelemetryPush(lua_State * L)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue