mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +03:00
Fixed accessPushTelemetry
This commit is contained in:
parent
138100e387
commit
863025cb2e
1 changed files with 4 additions and 7 deletions
|
@ -494,13 +494,10 @@ static int luaAccessTelemetryPush(lua_State * L)
|
||||||
if (outputTelemetryBuffer.isAvailable()) {
|
if (outputTelemetryBuffer.isAvailable()) {
|
||||||
uint8_t module = luaL_checkunsigned(L, 1);
|
uint8_t module = luaL_checkunsigned(L, 1);
|
||||||
uint8_t rxUid = luaL_checkunsigned(L, 2);
|
uint8_t rxUid = luaL_checkunsigned(L, 2);
|
||||||
|
outputTelemetryBuffer.sport.physicalId = getDataId(luaL_checkunsigned(L, 3));
|
||||||
SportTelemetryPacket packet;
|
outputTelemetryBuffer.sport.primId = luaL_checkunsigned(L, 4);
|
||||||
packet.physicalId = getDataId(luaL_checkunsigned(L, 3));
|
outputTelemetryBuffer.sport.dataId = luaL_checkunsigned(L, 5);
|
||||||
packet.primId = luaL_checkunsigned(L, 4);
|
outputTelemetryBuffer.sport.value = luaL_checkunsigned(L, 6);
|
||||||
packet.dataId = luaL_checkunsigned(L, 5);
|
|
||||||
packet.value = luaL_checkunsigned(L, 6);
|
|
||||||
outputTelemetryBuffer.pushSportPacketWithBytestuffing(packet);
|
|
||||||
outputTelemetryBuffer.setDestination((module << 2) + rxUid);
|
outputTelemetryBuffer.setDestination((module << 2) + rxUid);
|
||||||
lua_pushboolean(L, true);
|
lua_pushboolean(L, true);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue