Fix Radio -> TX telemetry sending
This commit is contained in:
@@ -46,6 +46,7 @@ void Pxx2Pulses::setupFrame(uint8_t port)
|
|||||||
#if defined(LUA)
|
#if defined(LUA)
|
||||||
if (outputTelemetryBufferTrigger != 0x00 && outputTelemetryBufferSize > 0) {
|
if (outputTelemetryBufferTrigger != 0x00 && outputTelemetryBufferSize > 0) {
|
||||||
// primID (1 byte) + dataID (2 bytes) + value (4 bytes)
|
// primID (1 byte) + dataID (2 bytes) + value (4 bytes)
|
||||||
|
addByte(outputTelemetryBufferTrigger);
|
||||||
for (uint8_t i=0; i<7; i++) {
|
for (uint8_t i=0; i<7; i++) {
|
||||||
addByte(outputTelemetryBuffer[i]);
|
addByte(outputTelemetryBuffer[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ extern "C" void TELEMETRY_DMA_TX_IRQHandler(void)
|
|||||||
if (DMA_GetITStatus(TELEMETRY_DMA_Stream_TX, TELEMETRY_DMA_TX_FLAG_TC)) {
|
if (DMA_GetITStatus(TELEMETRY_DMA_Stream_TX, TELEMETRY_DMA_TX_FLAG_TC)) {
|
||||||
DMA_ClearITPendingBit(TELEMETRY_DMA_Stream_TX, TELEMETRY_DMA_TX_FLAG_TC);
|
DMA_ClearITPendingBit(TELEMETRY_DMA_Stream_TX, TELEMETRY_DMA_TX_FLAG_TC);
|
||||||
TELEMETRY_USART->CR1 |= USART_CR1_TCIE;
|
TELEMETRY_USART->CR1 |= USART_CR1_TCIE;
|
||||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
if (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT || telemetryProtocol == PROTOCOL_TELEMETRY_PXX2) {
|
||||||
outputTelemetryBufferSize = 0;
|
outputTelemetryBufferSize = 0;
|
||||||
outputTelemetryBufferTrigger = 0x7E;
|
outputTelemetryBufferTrigger = 0x7E;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user