From 360dde2e1bf254e9700d2431f89f81fdc32132c8 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Thu, 17 Dec 2020 21:09:13 +0100 Subject: [PATCH] E016H: compilation fix --- Multiprotocol/E016H_cc2500.ino | 26 ++++++++++++-------------- Multiprotocol/Multiprotocol.h | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Multiprotocol/E016H_cc2500.ino b/Multiprotocol/E016H_cc2500.ino index 481e504..35582d0 100644 --- a/Multiprotocol/E016H_cc2500.ino +++ b/Multiprotocol/E016H_cc2500.ino @@ -27,7 +27,10 @@ Multiprotocol is distributed in the hope that it will be useful, static void __attribute__((unused)) E016H_send_packet() { - packet[0 ] = rx_tx_addr[0]; + //payload length (after this byte) + packet[0 ] = 0x0A; + + //bind indicator if(IS_BIND_IN_PROGRESS) { packet[1 ] = 0x02; @@ -41,6 +44,8 @@ static void __attribute__((unused)) E016H_send_packet() } else packet[1 ] = 0x20; + + //ID packet[2 ] = rx_tx_addr[2]; packet[3 ] = rx_tx_addr[3]; @@ -116,18 +121,6 @@ uint16_t E016H_callback() return E016H_PACKET_PERIOD; } -static void __attribute__((unused)) E016H_initialize_txid() -{ - //need to figure out ID&Freq - #ifdef FORCE_E016H_ORIGINAL_ID - rx_tx_addr[0]=0x0A; - rx_tx_addr[1]=0x02; // not used in the code - rx_tx_addr[2]=0x27; - rx_tx_addr[3]=0x1B; - hopping_frequency_no = 44; - #endif -} - uint16_t initE016H() { //Config CC2500 @@ -136,7 +129,12 @@ uint16_t initE016H() XN297L_Init(); XN297L_RFChannel(E016H_RF_BIND_CHANNEL); // Set bind channel - E016H_initialize_txid(); + //need to figure out ID&Freq + #ifdef FORCE_E016H_ORIGINAL_ID + rx_tx_addr[2]=0x27; + rx_tx_addr[3]=0x1B; + hopping_frequency_no = 44; + #endif bind_counter = E016H_BIND_COUNT; BIND_IN_PROGRESS; // Autobind protocol diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 9cd72a7..132b65e 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 1 -#define VERSION_PATCH_LEVEL 87 +#define VERSION_PATCH_LEVEL 88 //****************** // Protocols