mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 16:48:10 +00:00
SGF22 FX922 flags
This commit is contained in:
parent
756af87ec1
commit
b5b2dc37d4
@ -220,8 +220,9 @@
|
|||||||
94,0,Scorpio
|
94,0,Scorpio
|
||||||
95,0,Bluefly,HP100,0,CH5,CH6,CH7,CH8
|
95,0,Bluefly,HP100,0,CH5,CH6,CH7,CH8
|
||||||
96,0,BumbleB
|
96,0,BumbleB
|
||||||
97,0,SGF22,F22,1,Mode,Flip,LED,Pict,Video,TrRes
|
97,0,SGF22,F22,1,Mode,Flip,LED,Pict,Video,TrRes,Bal,HiBal
|
||||||
97,1,SGF22,F22S,1,Mode,Flip,LED,Pict,Video,TrRes
|
97,1,SGF22,F22S,1,Mode,Flip,LED,Pict,Video,TrRes
|
||||||
|
97,2,SGF22,J20,1,Mode,Flip,LED,Pict,Video
|
||||||
61,0,EazyRC
|
61,0,EazyRC
|
||||||
98,0,Kyosho3,ASF,0
|
98,0,Kyosho3,ASF,0
|
||||||
100,0,YuXiang,Std,0,Lock,Rate,Land,Manual,Flip,Mode,Pitch
|
100,0,YuXiang,Std,0,Lock,Rate,Land,Manual,Flip,Mode,Pitch
|
||||||
|
@ -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 22
|
#define VERSION_PATCH_LEVEL 23
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
|
@ -39,6 +39,10 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define SGF22_J20_FLAG_HORIZONTAL 0x80
|
#define SGF22_J20_FLAG_HORIZONTAL 0x80
|
||||||
//#define SGF22_J20_FLAG_SPEED 0x01 // Up/Down trim, not implemented
|
//#define SGF22_J20_FLAG_SPEED 0x01 // Up/Down trim, not implemented
|
||||||
|
|
||||||
|
#define SGF22_FX922_FLAG_BALANCEHIGH 0x01
|
||||||
|
#define SGF22_FX922_FLAG_BALANCE 0x02
|
||||||
|
|
||||||
|
|
||||||
//packet[9]
|
//packet[9]
|
||||||
#define SGF22_FLAG_TRIMRESET 0x04
|
#define SGF22_FLAG_TRIMRESET 0x04
|
||||||
#define SGF22_FLAG_PHOTO 0x40 // #define SGF22_J20_FLAG_INVERT 0x40
|
#define SGF22_FLAG_PHOTO 0x40 // #define SGF22_J20_FLAG_INVERT 0x40
|
||||||
@ -69,28 +73,15 @@ static void __attribute__((unused)) SGF22_send_packet()
|
|||||||
packet[8] = SGF22_FLAG_3D // CH5 -100%, F22 & F22S - 3D mode, J20 - Gyro off
|
packet[8] = SGF22_FLAG_3D // CH5 -100%, F22 & F22S - 3D mode, J20 - Gyro off
|
||||||
| GET_FLAG(CH6_SW, SGF22_FLAG_ROLL) // roll
|
| GET_FLAG(CH6_SW, SGF22_FLAG_ROLL) // roll
|
||||||
| GET_FLAG(CH7_SW, SGF22_FLAG_LIGHT) // push up throttle trim for light in the stock TX
|
| GET_FLAG(CH7_SW, SGF22_FLAG_LIGHT) // push up throttle trim for light in the stock TX
|
||||||
| GET_FLAG(CH9_SW, SGF22_FLAG_VIDEO); // push down throttle trim for video in the stock TX
|
| GET_FLAG(CH9_SW, SGF22_FLAG_VIDEO) // push down throttle trim for video in the stock TX
|
||||||
|
| GET_FLAG(CH11_SW, SGF22_FX922_FLAG_BALANCE)
|
||||||
|
| GET_FLAG(CH12_SW, SGF22_FX922_FLAG_BALANCEHIGH);
|
||||||
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
|
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
|
||||||
packet[8] |= SGF22_FLAG_VERTICAL; // CH5 100%, vertical mode (torque)
|
packet[8] |= SGF22_FLAG_VERTICAL; // CH5 100%, vertical mode (torque)
|
||||||
else if(Channel_data[CH5] > CHANNEL_MIN_COMMAND )
|
else if(Channel_data[CH5] > CHANNEL_MIN_COMMAND )
|
||||||
packet[8] |= ( sub_protocol == SGF22_J20 ? SGF22_J20_FLAG_HORIZONTAL : SGF22_FLAG_6G ); // CH5 0%, F22 & F22S - 6G mode, J20 - Horizontal mode
|
packet[8] |= ( sub_protocol == SGF22_J20 ? SGF22_J20_FLAG_HORIZONTAL : SGF22_FLAG_6G ); // CH5 0%, F22 & F22S - 6G mode, J20 - Horizontal mode
|
||||||
packet[9] = GET_FLAG(CH8_SW, SGF22_FLAG_PHOTO) // F22: photo, press in throttle trim in the stock TX, J20: invert flight
|
packet[9] = GET_FLAG(CH8_SW, SGF22_FLAG_PHOTO) // F22: photo, press in throttle trim in the stock TX, J20: invert flight
|
||||||
| GET_FLAG(CH10_SW, ( sub_protocol == SGF22_J20 ? SGF22_J20_FLAG_FIXHEIGHT : SGF22_FLAG_TRIMRESET )) ; // F22: Both sticks down inwards in the stock TX, J20: Altitude hold
|
| GET_FLAG(CH10_SW, ( sub_protocol == SGF22_J20 ? SGF22_J20_FLAG_FIXHEIGHT : SGF22_FLAG_TRIMRESET )) ; // F22: Both sticks down inwards in the stock TX, J20: Altitude hold
|
||||||
|
|
||||||
//Trial for FLYBear FX922
|
|
||||||
if(sub_protocol==SGF22_F22)
|
|
||||||
{
|
|
||||||
packet[8] = GET_FLAG(CH11_SW, 0x01)
|
|
||||||
| GET_FLAG(CH12_SW, 0x02)
|
|
||||||
| GET_FLAG(CH13_SW, 0x20)
|
|
||||||
| GET_FLAG(CH14_SW, 0x80);
|
|
||||||
packet[9] = GET_FLAG(CH15_SW, 0x01)
|
|
||||||
| GET_FLAG(CH16_SW, 0x02);
|
|
||||||
// | GET_FLAG(CH13_SW, 0x08)
|
|
||||||
// | GET_FLAG(CH13_SW, 0x10)
|
|
||||||
// | GET_FLAG(CH13_SW, 0x20)
|
|
||||||
// | GET_FLAG(CH13_SW, 0x80)
|
|
||||||
}
|
|
||||||
packet[10] = 0x42; // no fine tune
|
packet[10] = 0x42; // no fine tune
|
||||||
packet[11] = 0x10; // no fine tune
|
packet[11] = 0x10; // no fine tune
|
||||||
}
|
}
|
||||||
|
@ -2062,14 +2062,18 @@ A|E|T|R|FLIP|LIGHT|CALIB|HLESS|RTH|THR_CUT|ROTATE
|
|||||||
## SGF22 - *97*
|
## SGF22 - *97*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
|
||||||
---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET
|
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET|BAL|BALHIG
|
||||||
|
|
||||||
### Sub_protocol F22
|
### Sub_protocol F22
|
||||||
Model: SG F22
|
Model: SG F22
|
||||||
|
|
||||||
SGF22: Mode -100% = 3D, 0% = 6G, 100% = Vertical
|
Mode: -100% = 3D, 0% = 6G, 100% = Vertical
|
||||||
|
|
||||||
|
Model: FlyBear FX922
|
||||||
|
|
||||||
|
Manual CH11=-100% & CH12=-100%, Balance CH11=+100% & CH12=-100%, Large Angle Balance CH11=-100% & CH12=+100%
|
||||||
|
|
||||||
### Sub_protocol F22S
|
### Sub_protocol F22S
|
||||||
Model: ParkTen F22S
|
Model: ParkTen F22S
|
||||||
|
Loading…
x
Reference in New Issue
Block a user