mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2026-12-06 07:37:38 +00:00
FrSkyA: FrSky ACCESS on the CC2500 (#1214)
* FrSky X: S.Port frames to the receiver stored at payload[i-start-2]
FrSkyX_seq_sport() (SPORT_SEND) stored the outgoing bytes at
payload[i-start+2], i.e. payload[4] to payload[11] for the 8 bytes of
an LBT packet: up to 4 bytes past each frame's 8-byte payload (into the
next frame's count and payload, past the array for frame 3). The
retransmits sent payload[i] and payload[i-start+2], bytes from beyond
the frame. All three now use payload[i-start-2] (0 to 7).
* FrSkyA: FrSky ACCESS on the CC2500
New protocol 112, subtypes 16ch, 8ch (FCC) and EU16ch, EU8ch (only the
region flag differs: ACCESS uses the same channels, hops and timing in
both). Reversed from the ISRM and RX6R firmwares and captures of an X9
Lite with an RX6R; same CC2500 PHY as Mike's UNI ACCESS.
- register (channel 0) and bind (channel 239) in the same bind
- 16 or 8 channels every 7 ms, D16 channel packing, extended limits
- failsafe: one channel per frame in its slot, as the ISRM
- telemetry: RSSI / RxBatt and the S.Port stream as D16, S.Port packets
from the radio sent to the receiver (SportQueue(), split out of the
serial input for FrSkyX/X2/R9)
- receiver settings and hardware info (PXX2 messages 5 and 6) between
the receiver and a Lua script, MULTI telemetry type 18 ("Pipe") and
serial frames of 2 to 7 extra bytes
- not on the atmega328p nor in the 64KB CC2500 release (size)
Tested with an RX6R (ACCESS 2.1.8) and an Archer Plus SR10+ (1.0.10,
3.0.3): bind, channels, failsafe (S.Bus output), telemetry, receiver
settings and the SR10+ stabilizer settings over S.Port.
Needs FrSkyX_seq_sport() fixed (#1203): its resends overflowed and
froze the hopping at the first S.Port packet.
* Lua: FrSky ACCESS RX, receiver options for FrSkyA
The receiver options page of an ACCESS module for a receiver bound
with FrSkyA: name and versions, fast PWM, telemetry and 25mW,
S.Port/F.Port/F.Port2, S.Bus 24, PWM on CH5/CH6, the channel or port
mode of each output. Rows follow the capabilities the receiver
reports. Uses the Multi Lua pipe (multiBuffer "Pipe").
* FrSkyA Lua: receiver IDs 81 to 85
Names for the newer ACCESS receivers (SR6BL15A, SR6Lite, R6Lite,
RS-Lite, R2SIM), so an R6Lite shows by name instead of "ID 83".
---------
Co-authored-by: Raphael Coeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
This commit is contained in:
13 files changed
+1154
-53
No files matched your search
@@ -38,11 +38,13 @@ uint8_t RetrySequence ;
|
||||
|
||||
// Store for out of sequence packet
|
||||
uint8_t FrSkyX_RX_ValidSeq ;
|
||||
// Payload: up to 6 bytes from a D16 receiver, 8 from an ACCESS one
|
||||
#define FRSKYX_RX_PAYLOAD_MAX 8
|
||||
struct t_FrSkyX_RX_Frame
|
||||
{
|
||||
boolean valid;
|
||||
uint8_t count;
|
||||
uint8_t payload[6];
|
||||
uint8_t payload[FRSKYX_RX_PAYLOAD_MAX];
|
||||
} ;
|
||||
|
||||
// Store for FrskyX telemetry
|
||||
@@ -404,7 +406,7 @@ bool frsky_process_telemetry(uint8_t *buffer,uint8_t len)
|
||||
#endif
|
||||
|
||||
#if defined SPORT_TELEMETRY && (defined FRSKYX_CC2500_INO || defined FRSKYR9_SX1276_INO)
|
||||
if (protocol==PROTO_FRSKYX||protocol==PROTO_FRSKYX2)
|
||||
if (protocol==PROTO_FRSKYX||protocol==PROTO_FRSKYX2||protocol==PROTO_FRSKYA)
|
||||
{
|
||||
/*Telemetry frames(RF) SPORT info
|
||||
15 bytes payload
|
||||
@@ -438,7 +440,7 @@ bool frsky_process_telemetry(uint8_t *buffer,uint8_t len)
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
if (protocol==PROTO_FRSKYX||protocol==PROTO_FRSKYX2||protocol==PROTO_FRSKY_R9)
|
||||
if (protocol==PROTO_FRSKYX||protocol==PROTO_FRSKYX2||protocol==PROTO_FRSKYA||protocol==PROTO_FRSKY_R9)
|
||||
{
|
||||
telemetry_lost=0;
|
||||
|
||||
@@ -466,7 +468,7 @@ bool frsky_process_telemetry(uint8_t *buffer,uint8_t len)
|
||||
// buffer[7-12] payload
|
||||
p = &FrSkyX_RX_Frames[packet_seq] ;
|
||||
count = buffer[6]; // Payload length
|
||||
if ( count <= 6 )
|
||||
if ( count <= FRSKYX_RX_PAYLOAD_MAX )
|
||||
{//Store payload
|
||||
p->count = count ;
|
||||
for ( uint8_t i = 0 ; i < count ; i++ )
|
||||
@@ -497,7 +499,7 @@ bool frsky_process_telemetry(uint8_t *buffer,uint8_t len)
|
||||
{//Received next sequence -> save it
|
||||
q = &FrSkyX_RX_Frames[packet_seq] ;
|
||||
count = buffer[6]; // Payload length
|
||||
if ( count <= 6 )
|
||||
if ( count <= FRSKYX_RX_PAYLOAD_MAX )
|
||||
{//Store payload
|
||||
q->count = count ;
|
||||
for ( uint8_t i = 0 ; i < count ; i++ )
|
||||
@@ -932,9 +934,19 @@ void TelemetryUpdate()
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if defined(FRSKYA_CC2500_INO)
|
||||
if(protocol == PROTO_FRSKYA && FrSkyA_lua_out_len)
|
||||
{// Receiver message for the Lua script (multiBuffer "Pipe")
|
||||
multi_send_header(MULTI_TELEMETRY_RLINK, FrSkyA_lua_out_len);
|
||||
for (uint8_t i = 0; i < FrSkyA_lua_out_len; i++)
|
||||
Serial_write(FrSkyA_lua_out[i]);
|
||||
FrSkyA_lua_out_len = 0;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if defined SPORT_TELEMETRY
|
||||
if ((protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2||protocol==PROTO_FRSKY_R9) && telemetry_link
|
||||
if ((protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2||protocol==PROTO_FRSKYA||protocol==PROTO_FRSKY_R9) && telemetry_link
|
||||
#ifdef TELEMETRY_FRSKYX_TO_FRSKYD
|
||||
&& mode_select==MODE_SERIAL
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user