mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2026-12-06 07:37:38 +00:00
FUTABA/TFHSS: fix failsafe
This commit is contained in:
1 parent
8120789e0c
commit
c605e49334
4 files changed
+14
-13
No files matched your search
@@ -172,7 +172,7 @@
|
|||||||
50,1,Redpine,Slow,0,sCH5,sCH6,sCH7,sCH8,sCH9,sCH10,sCH11,sCH12,sCH13,sCH14,sCH15,sCH16
|
50,1,Redpine,Slow,0,sCH5,sCH6,sCH7,sCH8,sCH9,sCH10,sCH11,sCH12,sCH13,sCH14,sCH15,sCH16
|
||||||
21,0,Futaba,SFHSS,0,CH5,CH6,CH7,CH8
|
21,0,Futaba,SFHSS,0,CH5,CH6,CH7,CH8
|
||||||
21,1,Futaba,TFHSS,0,CH5,CH6,CH7,CH8
|
21,1,Futaba,TFHSS,0,CH5,CH6,CH7,CH8
|
||||||
21,2,Futaba,TFH-SR,0,CH5,CH6,CH7,CH8,NB_1,NB_2,NB_3,NB_4
|
21,2,Futaba,TFH-SR,0,NB_ST,NB_TH,NB_3,NB_4
|
||||||
21,3,Futaba,TF-Air,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
|
21,3,Futaba,TF-Air,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
|
||||||
19,0,Shenqi,Cycle,1
|
19,0,Shenqi,Cycle,1
|
||||||
68,0,Skyartec,Std,0,CH5,CH6,CH7
|
68,0,Skyartec,Std,0,CH5,CH6,CH7
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 4
|
#define VERSION_REVISION 4
|
||||||
#define VERSION_PATCH_LEVEL 76
|
#define VERSION_PATCH_LEVEL 77
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
// telemetry); then TFHSS_BIND_ACKED more with byte 1 bit 7 and its ID,
|
// telemetry); then TFHSS_BIND_ACKED more with byte 1 bit 7 and its ID,
|
||||||
// which make the receiver store the bind (R334SBS firmware). Failsafe: every 5 s a group of 4 frames, one
|
// which make the receiver store the bind (R334SBS firmware). Failsafe: every 5 s a group of 4 frames, one
|
||||||
// per channel: its F/S position, or hold (the 4PM Plus' default).
|
// per channel: its F/S position, or hold (the 4PM Plus' default).
|
||||||
// In SR, the per channel "high speed"="narrow-band" flags in byte 9 (3 ms output frames) are driven by CH9..CH12
|
// In SR, the per channel "high speed"="narrow-band" flags in byte 9 (3 ms output frames) are driven by CH5..CH8
|
||||||
//
|
//
|
||||||
// Air (TFHSS_AIR): 128 kbps 2-FSK (the S-FHSS modem), 17 bytes, a frame
|
// Air (TFHSS_AIR): 128 kbps 2-FSK (the S-FHSS modem), 17 bytes, a frame
|
||||||
// every 15.04 ms; 16 channels in 9 slots of 11 bits (us - 880), a slot's
|
// every 15.04 ms; 16 channels in 9 slots of 11 bits (us - 880), a slot's
|
||||||
@@ -338,14 +338,13 @@ static void __attribute__((unused)) TFHSS_surface_packet()
|
|||||||
#ifdef FAILSAFE_ENABLE
|
#ifdef FAILSAFE_ENABLE
|
||||||
uint16_t v = Failsafe_data[c];
|
uint16_t v = Failsafe_data[c];
|
||||||
if(IS_FAILSAFE_VALUES_on && v != FAILSAFE_CHANNEL_HOLD && v != FAILSAFE_CHANNEL_NOPULSES)
|
if(IS_FAILSAFE_VALUES_on && v != FAILSAFE_CHANNEL_HOLD && v != FAILSAFE_CHANNEL_NOPULSES)
|
||||||
{
|
+ { // F/S: code 4 without the hold flag (4PM Plus)
|
||||||
f |= 0x04;
|
f |= 0x04;
|
||||||
|
fs = 0x00;
|
||||||
ch[c] = TFHSS_value(c, true);
|
ch[c] = TFHSS_value(c, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
uint8_t slot = TFHSS_frame & 3;
|
|
||||||
uint16_t e = TFHSS_value(4 + slot, false);
|
|
||||||
packet[0] = (sr ? 1 : 0) | (TFHSS_row & 7) << 5;
|
packet[0] = (sr ? 1 : 0) | (TFHSS_row & 7) << 5;
|
||||||
packet[1] = TFHSS_row >> 3 | (sr ? 0 : 0x10) | (f & 3) << 6;
|
packet[1] = TFHSS_row >> 3 | (sr ? 0 : 0x10) | (f & 3) << 6;
|
||||||
packet[2] = (f >> 2) | (ch[0] & 0x0F) << 4;
|
packet[2] = (f >> 2) | (ch[0] & 0x0F) << 4;
|
||||||
@@ -355,10 +354,12 @@ static void __attribute__((unused)) TFHSS_surface_packet()
|
|||||||
packet[6] = ch[2] >> 4;
|
packet[6] = ch[2] >> 4;
|
||||||
packet[7] = ch[3];
|
packet[7] = ch[3];
|
||||||
packet[8] = (ch[3] >> 8) | 0x10;
|
packet[8] = (ch[3] >> 8) | 0x10;
|
||||||
// Bits 0..3: high speed flags of CH1..4
|
// packet[9] bits 0..3: high speed flags of CH1..4 . In SR, the narrow-band outputs ("SR channels" of Futaba radios) are set by CH5..CH8
|
||||||
// In SR, the narrow-band outputs ("SR channels" of Futaba radios) are set by CH9..CH12
|
uint8_t nb = sr ? Channel_AUX & 0x0F : 0;
|
||||||
uint8_t nb = sr ? (Channel_AUX >> 4) & 0x0F : 0;
|
|
||||||
packet[9] = fs | nb;
|
packet[9] = fs | nb;
|
||||||
|
// One extra channel CH5..CH8 per frame but none in SR mode (4PM Plus)
|
||||||
|
uint8_t slot = sr ? 0 : TFHSS_frame & 3;
|
||||||
|
uint16_t e = sr ? 0 : TFHSS_value(4 + slot, false);
|
||||||
packet[10] = e;
|
packet[10] = e;
|
||||||
packet[11] = (e >> 8) | slot << 4;
|
packet[11] = (e >> 8) | slot << 4;
|
||||||
TFHSS_build(TFHSS_LEN, true);
|
TFHSS_build(TFHSS_LEN, true);
|
||||||
|
|||||||
@@ -1215,11 +1215,11 @@ CH1 to CH4 are sent every frame (3 ms), CH5 to CH8 one per frame.
|
|||||||
### Sub_protocol TFHSS_SR - *2*
|
### Sub_protocol TFHSS_SR - *2*
|
||||||
T-FHSS SR (Super Response), the receiver bound in SR mode: frames every 1.2 ms, digital servos only. No telemetry. Otherwise as T-FHSS.
|
T-FHSS SR (Super Response), the receiver bound in SR mode: frames every 1.2 ms, digital servos only. No telemetry. Otherwise as T-FHSS.
|
||||||
|
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
|
||||||
---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---
|
||||||
ST|THR|CH3|CH4|CH5|CH6|CH7|CH8|NB_1|NB_2|NB_3|NB_4
|
ST|THR|CH3|CH4|NB_ST|NB_THR|NB_3|NB_4
|
||||||
|
|
||||||
NB_1..4: Flags for Narrow-band servos (the "SR channels" of Futaba radios) associated to CH1..4
|
NB_ST..4: Set to 100% for Narrow-band servos (the "SR channels" of Futaba radios) associated to CH1..4
|
||||||
|
|
||||||
### Sub_protocol TFHSS_AIR - *3*
|
### Sub_protocol TFHSS_AIR - *3*
|
||||||
T-FHSS Air. Models: Futaba T-FHSS Air receivers like the R3006SB and R3008SB.
|
T-FHSS Air. Models: Futaba T-FHSS Air receivers like the R3006SB and R3008SB.
|
||||||
|
|||||||
Reference in new issue
Block a user