E129/C186 new circular flight flag

This commit is contained in:
pascallanger 2023-10-23 11:24:37 +02:00
parent 01bc08575f
commit 1294ad21cf
4 changed files with 16 additions and 11 deletions

View File

@ -198,7 +198,7 @@
81,0,E010r5,E010r5,1,Flip,LED,CALIB,HLess,RTH,GLIDE 81,0,E010r5,E010r5,1,Flip,LED,CALIB,HLess,RTH,GLIDE
82,0,LOLI,Std,0,CH5,CH6,CH7,CH8,1SwSePpPw,2SwSePw,3SwSe,4SwSe,5SwSeSb,6SwSe,7SwSePw,8SwSe 82,0,LOLI,Std,0,CH5,CH6,CH7,CH8,1SwSePpPw,2SwSePw,3SwSe,4SwSe,5SwSeSb,6SwSe,7SwSePw,8SwSe
83,0,E129,E129,1,TakLan,EmStop,TrimA,TrimE,TrimR 83,0,E129,E129,1,TakLan,EmStop,TrimA,TrimE,TrimR
83,1,E129,C186,1,TakLan,EmStop,TrimA,TrimE,TrimR 83,1,E129,C186,1,TakLan,EmStop,TrimA,TrimE,TrimR,Loop
84,0,JOYSWAY,Std,0 84,0,JOYSWAY,Std,0
85,0,E016H,Std,1,Stop,Flip,n-a,HLess,RTH 85,0,E016H,Std,1,Stop,Flip,n-a,HLess,RTH
87,0,IKEA 87,0,IKEA

View File

@ -54,8 +54,9 @@ static void __attribute__((unused)) E129_build_data_packet()
packet[16] = bit_reverse(rx_tx_addr[1]); packet[16] = bit_reverse(rx_tx_addr[1]);
} }
//packet[ 3] = 0x00; // E129 Mode: short press=0x20->0x00->0x20->..., long press=0x10->0x30->0x10->... => C186 throttle trim is doing the same:up=short press and down=long press //packet[ 3] = 0x00; // E129 Mode: short press=0x20->0x00->0x20->..., long press=0x10->0x30->0x10->... => C186 throttle trim is doing the same:up=short press and down=long press
packet[ 4] = GET_FLAG(CH5_SW, 0x20) // Take off/Land 0x20 packet[ 3] = GET_FLAG(CH10_SW, 0x40); // C159 loop flight 0x40, flag 0x04 is also set on this heli
| GET_FLAG(CH6_SW, 0x04); // Emergency stop 0x04 packet[ 4] = GET_FLAG(CH5_SW, 0x20) // Take off/Land 0x20
| GET_FLAG(CH6_SW, 0x04); // Emergency stop 0x04
//Channels and trims //Channels and trims
uint16_t val = convert_channel_10b(AILERON,false); uint16_t val = convert_channel_10b(AILERON,false);
uint8_t trim = convert_channel_8b(CH7) & 0xFC; uint8_t trim = convert_channel_8b(CH7) & 0xFC;
@ -80,13 +81,11 @@ static void __attribute__((unused)) E129_build_data_packet()
packet[12] = val; // channel (0x000...0x200...0x3FF) packet[12] = val; // channel (0x000...0x200...0x3FF)
} }
//Check //Check
if(sub_protocol == E129_E129) for(uint8_t i=0;i<packet_length-2;i++)
packet[packet_length-2] = packet[0] + packet[1];
else
packet[packet_length-2] = 0x24 + packet[0] + (packet[1]&0x03); // ??
for(uint8_t i=2;i<packet_length-2;i++)
packet[packet_length-2] += packet[i]; packet[packet_length-2] += packet[i];
if(sub_protocol == E129_C186)
packet[packet_length-2] -= 0x80;
RF2500_BuildPayload(packet); RF2500_BuildPayload(packet);
} }

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 3 #define VERSION_MINOR 3
#define VERSION_REVISION 3 #define VERSION_REVISION 3
#define VERSION_PATCH_LEVEL 33 #define VERSION_PATCH_LEVEL 34
#define MODE_SERIAL 0 #define MODE_SERIAL 0

View File

@ -616,10 +616,16 @@ Calib is the same as the original radio with both sticks down and to the left in
Models: Eachine E129/E130 and Twister Ninja 250 Models: Eachine E129/E130 and Twister Ninja 250
### Sub_protocol C186 - *1* ### Sub_protocol C186 - *1*
Models: C186/E120, C127/E110, K127, C159 Models: C186/E120, C127/E110, K127, C159, C189
The FC of the heli seems to store the trims Trim A/E/R=CH7..9. If you use these trims, make sure to center them after powering off the heli or they will be added to the previous trims and over correct. The FC of the heli seems to store the trims Trim A/E/R=CH7..9. If you use these trims, make sure to center them after powering off the heli or they will be added to the previous trims and over correct.
CH10|
---|
Loop|
Loop: circular flight on the C159 (others?)
## J6Pro - *22* ## J6Pro - *22*
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12 CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12