mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 23:58:11 +00:00
FrSkyD telemetry
This commit is contained in:
parent
9ce23c3d61
commit
47b4409f3e
@ -175,8 +175,9 @@ void frsky_check_telemetry(uint8_t *pkt,uint8_t len)
|
|||||||
TX_LQI = pkt[len-1]&0x7F;
|
TX_LQI = pkt[len-1]&0x7F;
|
||||||
for (uint8_t i=3;i<len-2;i++)
|
for (uint8_t i=3;i<len-2;i++)
|
||||||
pktt[i]=pkt[i]; // Buffer telemetry values to be sent
|
pktt[i]=pkt[i]; // Buffer telemetry values to be sent
|
||||||
if(pktt[6]>0 && pktt[6]<=10) // && (pktt[7]&0x1F) == telemetry_counter )
|
uint8_t next_sequence = (telemetry_counter+1)%32;
|
||||||
telemetry_counter=(telemetry_counter+1)%32; // Request next telemetry frame
|
if((pktt[6]>0 && pktt[6]<=10) && ( pktt[7] & 0x1F ) == next_sequence )
|
||||||
|
telemetry_counter = next_sequence ; // Request next telemetry frame
|
||||||
else
|
else
|
||||||
pktt[6]=0; // Discard packet
|
pktt[6]=0; // Discard packet
|
||||||
//
|
//
|
||||||
@ -258,6 +259,7 @@ void frsky_user_frame()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
frame[1]=pktt[6]; // packet size
|
frame[1]=pktt[6]; // packet size
|
||||||
|
pktt[6]=0;
|
||||||
telemetry_link=0; // only 1 packet or processing second packet
|
telemetry_link=0; // only 1 packet or processing second packet
|
||||||
}
|
}
|
||||||
frame[2] = pktt[7];
|
frame[2] = pktt[7];
|
||||||
@ -581,11 +583,6 @@ void TelemetryUpdate()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(telemetry_link == 1 && protocol != MODE_FRSKYX)
|
|
||||||
{ // FrSkyD + Hubsan + AFHDS2A + Bayang
|
|
||||||
frsky_link_frame();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#if defined HUB_TELEMETRY
|
#if defined HUB_TELEMETRY
|
||||||
if(telemetry_link > 1 && protocol == MODE_FRSKYD)
|
if(telemetry_link > 1 && protocol == MODE_FRSKYD)
|
||||||
{ // FrSkyD
|
{ // FrSkyD
|
||||||
@ -593,6 +590,11 @@ void TelemetryUpdate()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if(telemetry_link == 1 && protocol != MODE_FRSKYX)
|
||||||
|
{ // FrSkyD + Hubsan + AFHDS2A + Bayang
|
||||||
|
frsky_link_frame();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user