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:
parent
d0ec3e0266
commit
7dd32c8878
2 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue