SPORT telemetry push fix (part 1)
This commit is contained in:
@@ -207,7 +207,7 @@ extern "C" void TELEMETRY_USART_IRQHandler(void)
|
|||||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
||||||
static uint8_t prevdata;
|
static uint8_t prevdata;
|
||||||
if (prevdata == 0x7E && outputTelemetryBuffer.size > 0 && outputTelemetryBuffer.destination == TELEMETRY_ENDPOINT_SPORT && data == outputTelemetryBuffer.sport.physicalId) {
|
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;
|
prevdata = data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ extern "C" void TELEMETRY_USART_IRQHandler(void)
|
|||||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
||||||
static uint8_t prevdata;
|
static uint8_t prevdata;
|
||||||
if (prevdata == 0x7E && outputTelemetryBuffer.destination == TELEMETRY_ENDPOINT_SPORT && data == outputTelemetryBuffer.sport.physicalId) {
|
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;
|
prevdata = data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class OutputTelemetryBuffer {
|
|||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
uint16_t crc = 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++) {
|
for (uint8_t i=1; i<sizeof(SportTelemetryPacket); i++) {
|
||||||
uint8_t byte = packet.raw[i];
|
uint8_t byte = packet.raw[i];
|
||||||
pushByteWithBytestuffing(byte);
|
pushByteWithBytestuffing(byte);
|
||||||
|
|||||||
Reference in New Issue
Block a user