mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 18:28:15 +00:00
Fix: Update_aux_flags missplaced for PPM input
This commit is contained in:
parent
ae0478a7e9
commit
a689ce4de9
@ -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)
|
||||
@ -125,10 +125,10 @@ static void check_telemetry(uint8_t *pkt,uint8_t len)
|
||||
else
|
||||
{
|
||||
for (uint8_t i=3;i<len;i++)
|
||||
pktt[i]=pkt[i];
|
||||
pktt[i]=pkt[i];
|
||||
telemetry_link=1;
|
||||
if(pktt[6]>0)
|
||||
telemetry_counter=(telemetry_counter+1)%32;
|
||||
telemetry_counter=(telemetry_counter+1)%32;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user