From 110378e3b4973a2676859385fb58bd96c0e23240 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Sun, 26 Nov 2017 15:36:33 +0100 Subject: [PATCH] Cabell protocol change --- Multiprotocol/CABELL_nrf224l01.ino | 12 ++++++------ Multiprotocol/_Config.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Multiprotocol/CABELL_nrf224l01.ino b/Multiprotocol/CABELL_nrf224l01.ino index 4edab1f..e272eb2 100644 --- a/Multiprotocol/CABELL_nrf224l01.ino +++ b/Multiprotocol/CABELL_nrf224l01.ino @@ -124,7 +124,7 @@ static void __attribute__((unused)) CABELL_get_telemetry() if (NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_RX_DR)) { // data received from model NRF24L01_ReadPayload(packet, CABELL_TELEMETRY_PACKET_LENGTH); - if ((packet[0] & 0x7F) == CABELL_RxTxPacket_t::RxMode_t::telemetryResponse) // ignore high order bit in compare because it toggles with each packet + if ((packet[0] & 0x7F) == CABELL_RxTxPacket_t::telemetryResponse) // ignore high order bit in compare because it toggles with each packet { RX_RSSI = packet[1]; // Packet rate 0 to 255 where 255 is 100% packet rate v_lipo1 = packet[2]; // Directly from analog input of receiver, but reduced to 8-bit depth (0 to 255). Scaling depends on the input to the analog pin of the receiver. @@ -164,26 +164,26 @@ static void __attribute__((unused)) CABELL_send_packet(uint8_t bindMode) if ((sub_protocol == CABELL_UNBIND) && !bindMode) { - TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::unBind; + TxPacket.RxMode = CABELL_RxTxPacket_t::unBind; TxPacket.option = option; } else { if (sub_protocol == CABELL_SET_FAIL_SAFE && !bindMode) - TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::setFailSafe; + TxPacket.RxMode = CABELL_RxTxPacket_t::setFailSafe; else { if (bindMode) - TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::bind; + TxPacket.RxMode = CABELL_RxTxPacket_t::bind; else { switch (sub_protocol) { case CABELL_V3_TELEMETRY: - TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::normalWithTelemetry; + TxPacket.RxMode = CABELL_RxTxPacket_t::normalWithTelemetry; break; default: - TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::normal; + TxPacket.RxMode = CABELL_RxTxPacket_t::normal; break; } } diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index d7ac958..f8ea3ff 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -53,7 +53,7 @@ /*** BOOTLOADER USE ***/ /*************************/ //Allow flashing multimodule directly with TX(erky9x or opentx modified firmwares) -//Check https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/tree/master/BootLoaders +//Instructions: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/tree/master/BootLoaders#compiling--uploading-firmware-with-the-flash-from-tx-bootloader //To enable this feature remove the "//" on the next line. It is automatically enabled/disabled when you use the AVR Multi boards. //#define CHECK_FOR_BOOTLOADER