mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 09:15:38 +03:00
SPORT telemetry push fix (part 1)
This commit is contained in:
parent
73a21a3e7e
commit
ab38676ffd
3 changed files with 3 additions and 3 deletions
|
@ -207,7 +207,7 @@ extern "C" void TELEMETRY_USART_IRQHandler(void)
|
|||
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
||||
static uint8_t prevdata;
|
||||
if (prevdata == 0x7E && outputTelemetryBuffer.size > 0 && outputTelemetryBuffer.destination == TELEMETRY_ENDPOINT_SPORT && data == outputTelemetryBuffer.sport.physicalId) {
|
||||
sportSendBuffer(outputTelemetryBuffer.data, outputTelemetryBuffer.size);
|
||||
sportSendBuffer(outputTelemetryBuffer.data + 1, outputTelemetryBuffer.size - 1);
|
||||
}
|
||||
prevdata = data;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ extern "C" void TELEMETRY_USART_IRQHandler(void)
|
|||
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
||||
static uint8_t prevdata;
|
||||
if (prevdata == 0x7E && outputTelemetryBuffer.destination == TELEMETRY_ENDPOINT_SPORT && data == outputTelemetryBuffer.sport.physicalId) {
|
||||
sportSendBuffer(outputTelemetryBuffer.data, outputTelemetryBuffer.size);
|
||||
sportSendBuffer(outputTelemetryBuffer.data + 1, outputTelemetryBuffer.size - 1);
|
||||
}
|
||||
prevdata = data;
|
||||
}
|
||||
|
|
|
@ -209,7 +209,7 @@ class OutputTelemetryBuffer {
|
|||
{
|
||||
size = 0;
|
||||
uint16_t crc = 0;
|
||||
sport.physicalId = packet.physicalId; // no bytestuffing, no CRC
|
||||
pushByte(packet.physicalId); // no bytestuffing, no CRC
|
||||
for (uint8_t i=1; i<sizeof(SportTelemetryPacket); i++) {
|
||||
uint8_t byte = packet.raw[i];
|
||||
pushByteWithBytestuffing(byte);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue