Fix: Update_aux_flags missplaced for PPM input

This commit is contained in:
pascallanger 2016-01-26 22:33:17 +01:00
parent ae0478a7e9
commit a689ce4de9
2 changed files with 7 additions and 6 deletions

View File

@ -91,7 +91,7 @@ uint16_t ReadFrSky_2way()
if (state == FRSKY_DATA1)
{
len = cc2500_readReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
if (len)//20 bytes
if (len<=MAX_PKT)//27 bytes
{
cc2500_readFifo(pkt, len); //received telemetry packets
#if defined(TELEMETRY)

View File

@ -90,8 +90,9 @@ uint8_t prev_protocol=0;
// Telemetry
#if defined(TELEMETRY)
uint8_t pkt[27];//telemetry receiving packets
uint8_t pktt[27];//telemetry receiving packets
#define MAX_PKT 27
uint8_t pkt[MAX_PKT];//telemetry receiving packets
uint8_t pktt[MAX_PKT];//telemetry receiving packets
volatile uint8_t tx_head;
volatile uint8_t tx_tail;
uint8_t v_lipo;
@ -207,8 +208,8 @@ void loop()
cli(); // disable global int
Servo_data[i]=PPM_data[i];
sei(); // enable global int
update_aux_flags();
}
update_aux_flags();
PPM_FLAG_off; // wait for next frame before update
}
update_led_status();