mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 12:25:12 +03:00
If sensor is not found we send Lua SPORT frames to the SPORT line
This commit is contained in:
parent
0d1945ae21
commit
b9b5d71f60
1 changed files with 13 additions and 0 deletions
|
@ -454,6 +454,19 @@ static int luaSportTelemetryPush(lua_State * L)
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// sensor not found, we send the frame to the SPORT line
|
||||
{
|
||||
SportTelemetryPacket packet;
|
||||
packet.physicalId = getDataId(luaL_checkunsigned(L, 1));
|
||||
packet.primId = luaL_checkunsigned(L, 2);
|
||||
packet.dataId = dataId;
|
||||
packet.value = luaL_checkunsigned(L, 4);
|
||||
outputTelemetryBuffer.pushSportPacketWithBytestuffing(packet);
|
||||
outputTelemetryBuffer.setDestination(TELEMETRY_ENDPOINT_SPORT);
|
||||
lua_pushboolean(L, true);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pushboolean(L, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue