Crossfire telemetry protocol start
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "../../opentx.h"
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(FRSKY)
|
||||
|
||||
@@ -33,9 +33,6 @@ void telemetryEnableRx(void)
|
||||
UCSRB_N(TLM_USART) |= (1 << RXCIE_N(TLM_USART)); // enable Interrupt
|
||||
}
|
||||
|
||||
void processFrskyTelemetryData(uint8_t data);
|
||||
extern uint8_t frskyRxBufferCount; // TODO not driver, change name
|
||||
|
||||
ISR(USART_RX_vect_N(TLM_USART))
|
||||
{
|
||||
uint8_t stat;
|
||||
@@ -79,7 +76,7 @@ ISR(USART_RX_vect_N(TLM_USART))
|
||||
|
||||
if (stat & ((1 << FE_N(TLM_USART)) | (1 << DOR_N(TLM_USART)) | (1 << UPE_N(TLM_USART)))) {
|
||||
// discard buffer and start fresh on any comms error
|
||||
frskyRxBufferCount = 0;
|
||||
telemetryRxBufferCount = 0;
|
||||
}
|
||||
else {
|
||||
processFrskyTelemetryData(data);
|
||||
|
||||
Reference in New Issue
Block a user