1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Implement s.port polling for multi (#5521)

Sport polling is implemented quite low level for regular s.port.
Go another approach for multi and add another multi type for s.port polling
This commit is contained in:
Arne Schwabe 2017-12-18 23:00:03 +01:00 committed by Bertrand Songis
parent d0ec3e0266
commit 7dd32c8878
2 changed files with 13 additions and 0 deletions

View file

@ -35,6 +35,7 @@ enum MultiPacketTypes : uint8_t {
FlyskyIBusTelemetry,
ConfigCommand,
InputSync,
FrskySportPolling
};
enum MultiBufferState : uint8_t {
@ -147,6 +148,14 @@ static void processMultiTelemetryPaket(const uint8_t *packet)
case ConfigCommand:
// Just an ack to our command, ignore for now
break;
case FrskySportPolling:
#if defined(LUA)
if (len >= 1 && outputTelemetryBufferSize > 0 && data[0] == outputTelemetryBufferTrigger) {
TRACE("MP Sending sport data out.");
sportSendBuffer(outputTelemetryBuffer, outputTelemetryBufferSize);
}
#endif
break;
default:
TRACE("[MP] Unkown multi packet type 0x%02X, len %d", type, len);
break;