SGF22/T28: Add features

This commit is contained in:
pascallanger
2026-08-16 11:30:22 +02:00
parent 5984216fbd
commit 9354abe5fd
4 changed files with 16 additions and 8 deletions

View File

@@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 4
#define VERSION_PATCH_LEVEL 65
#define VERSION_PATCH_LEVEL 66
#define MODE_SERIAL 0

View File

@@ -46,6 +46,7 @@ Multiprotocol is distributed in the hope that it will be useful,
#define SGF22_FX922_FLAG_BALANCEHIGH 0x01
#define SGF22_FX922_FLAG_BALANCE 0x02
#define SGF22_T18_RTH_SET 0x20
//packet[9]
#define SGF22_FLAG_TRIMRESET 0x04
@@ -90,11 +91,12 @@ static void __attribute__((unused)) SGF22_send_packet()
| 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(CH11_SW, SGF22_FX922_FLAG_BALANCE)
| GET_FLAG(CH12_SW, SGF22_FX922_FLAG_BALANCEHIGH);
| GET_FLAG(CH12_SW, SGF22_FX922_FLAG_BALANCEHIGH)
| GET_FLAG(CH13_SW, SGF22_T18_RTH_SET);
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
packet[8] |= SGF22_FLAG_VERTICAL; // CH5 100%, vertical mode (torque)
packet[8] |= ( sub_protocol == SGF22_T28 ? SGF22_T28_FLAG_OPTIMIZED : SGF22_FLAG_VERTICAL); // CH5 100%, vertical mode (torque)
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
}
else //SGF22_CX10 114548
{