From 6e1701ecc55def6464d3c47cdaa50f7f14e8d747 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Sun, 14 Jun 2020 23:22:27 +0200 Subject: [PATCH] Q90C: Flight Modes --- Multiprotocol/Q90C_nrf24l01.ino | 24 ++++++++++++++++++------ Protocols_Details.md | 5 +++-- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Multiprotocol/Q90C_nrf24l01.ino b/Multiprotocol/Q90C_nrf24l01.ino index 4471540..f2500c9 100644 --- a/Multiprotocol/Q90C_nrf24l01.ino +++ b/Multiprotocol/Q90C_nrf24l01.ino @@ -43,9 +43,7 @@ static void __attribute__((unused)) Q90C_send_packet() { memcpy(packet, rx_tx_addr, 4); memcpy(&packet[4], hopping_frequency, 3); - packet[7] = 0x1e; // 2e on Saimat 1??? - packet[8] = 0x00; - packet[9] = 0x00; + //packet[7] = 0x1e; // 2e on Saimat 1??? packet[10] = 0x4B; packet[11] = 0x4E; } @@ -78,11 +76,20 @@ static void __attribute__((unused)) Q90C_send_packet() packet[4] = 0x1e; // T trim 00-1e-3c packet[5] = 0x1e; // R trim 3c-1e-00 packet[6] = 0x1e; // E trim 00-1e-3c - packet[7] = 0x1e; // A trim 00-1e-3c - packet[8] = 0x00; // flags: 3 position flight mode (Angle - Horizon - Acro), VTX Toggle HIGH = next vTX frequency - packet[9] = 0x00; + //packet[7] = 0x1e; // A trim 00-1e-3c + if(state!=Channel_data[CH5]) + { + state=Channel_data[CH5]; + if(stateCHANNEL_MAX_COMMAND) + packet[8] ^= 0x10; // Acro + else + packet[8] ^= 0x08; // Horizon + } packet[10] = packet_count++; } + packet[7] = 0x1e; // bind 1e or 2e, normal: A trim 00-1e-3c // checksum if(IS_BIND_DONE) @@ -153,6 +160,11 @@ uint16_t initQ90C() hopping_frequency_no = 0; packet_count = 0; bind_counter=Q90C_BIND_COUNT; + + //features + state=Channel_data[CH5]; + packet[8] = 0x00; + packet[9] = 0x00; return Q90C_INITIAL_WAIT; } diff --git a/Protocols_Details.md b/Protocols_Details.md index 209c087..84a62ff 100644 --- a/Protocols_Details.md +++ b/Protocols_Details.md @@ -1302,12 +1302,13 @@ This protocol is known to be problematic because it's using the xn297L emulation If the model does not respond well to inputs or hard to bind, you can try to switch the emulation from the default NRF24L01 RF component to the CC2500 by using an option value (freq tuning) different from 0. Option in this case is used for fine frequency tuning like any CC2500 protocols so check the [Frequency Tuning page](/docs/Frequency_Tuning.md). -**Only 1 ID available. FMODE and VTX+ are not supported. If you have a TX then contact me on GitHub or RCGroups.** - CH1|CH2|CH3|CH4|CH5|CH6 ---|---|---|---|---|--- A|E|T|R|FMODE|VTX+ +FMODE: -100% angle, 0% horizon, +100% acro +VTX+: not working yet + ## Redpine - *50* [Link to the forum](https://www.rcgroups.com/forums/showthread.php?3236043-Redpine-Lowest-latency-RC-protocol)