From b18adb0efe4c46cc32646ea5ca0727022c4fe42a Mon Sep 17 00:00:00 2001 From: pascallanger Date: Fri, 16 Feb 2024 10:24:44 +0100 Subject: [PATCH] SGF22.3 --- Multiprotocol/SGF22_nrf24l01.ino | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Multiprotocol/SGF22_nrf24l01.ino b/Multiprotocol/SGF22_nrf24l01.ino index 90bb338b0..02d0cb90b 100644 --- a/Multiprotocol/SGF22_nrf24l01.ino +++ b/Multiprotocol/SGF22_nrf24l01.ino @@ -26,11 +26,14 @@ Multiprotocol is distributed in the hope that it will be useful, #define SGF22_BIND_COUNT 50 #define SGF22_RF_NUM_CHANNELS 4 +//packet[8] +#define SGF22_FLAG_3D 0x00 +#define SGF22_FLAG_ROLL 0x08 #define SGF22_FLAG_LIGHT 0x04 +#define SGF22_FLAG_VIDEO 0x10 #define SGF22_FLAG_6G 0x40 #define SGF22_FLAG_VERTICAL 0xC0 -#define SGF22_FLAG_3D 0x00 -#define SGF22_FLAG_ROLL 0x08 +//packet[9] #define SGF22_FLAG_PHOTO 0x40 static void __attribute__((unused)) SGF22_send_packet() @@ -56,12 +59,14 @@ static void __attribute__((unused)) SGF22_send_packet() packet[0] = 0x1B; packet[8] = SGF22_FLAG_3D // default | GET_FLAG(CH6_SW, SGF22_FLAG_ROLL) // roll - | GET_FLAG(CH7_SW, SGF22_FLAG_LIGHT); // press up throttle trim for light + | GET_FLAG(CH7_SW, SGF22_FLAG_LIGHT) // push up throttle trim for light + | GET_FLAG(CH9_SW, SGF22_FLAG_VIDEO); // push down throttle trim for video if(Channel_data[CH5] > CHANNEL_MIN_COMMAND) packet[8] |= SGF22_FLAG_6G; // mode 1 - 6g if(Channel_data[CH5] > CHANNEL_MAX_COMMAND) packet[8] |= SGF22_FLAG_VERTICAL; // mode 0 - vertical GET_FLAG(CH8_SW, SGF22_FLAG_PHOTO); // press down throttle trim for photo + packet[9] = GET_FLAG(CH8_SW, SGF22_FLAG_PHOTO); // press in throttle trim for photo packet[10] = 0x42; // no fine tune packet[11] = 0x10; // no fine tune }