From 2ad3c727fddbb05dc3b89067ab877d3f525e9f9c Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Mon, 1 Mar 2021 13:48:23 +0100 Subject: [PATCH] Few changes... --- Multiprotocol/MT99xx_nrf24l01.ino | 3 ++- Multiprotocol/OMP_cc2500.ino | 3 +-- Multiprotocol/WFLY_cyrf6936.ino | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Multiprotocol/MT99xx_nrf24l01.ino b/Multiprotocol/MT99xx_nrf24l01.ino index f125210..836bf10 100644 --- a/Multiprotocol/MT99xx_nrf24l01.ino +++ b/Multiprotocol/MT99xx_nrf24l01.ino @@ -356,7 +356,8 @@ uint16_t MT99XX_callback() { // set tx address for data packets XN297_SetTXAddr(rx_tx_addr, 5); - uint8_t channel_offset = (((crc8 & 0xf0)>>4) + (crc8 & 0x0f)) % 8; + // set rf channels + uint8_t channel_offset = ((crc8>>4) + (crc8 & 0x0f)) % 8; for(uint8_t i=0;i<16;i++) hopping_frequency[i] += channel_offset; BIND_DONE; diff --git a/Multiprotocol/OMP_cc2500.ino b/Multiprotocol/OMP_cc2500.ino index c88eded..5cb5630 100644 --- a/Multiprotocol/OMP_cc2500.ino +++ b/Multiprotocol/OMP_cc2500.ino @@ -118,7 +118,6 @@ static void __attribute__((unused)) OMP_RF_init() #ifdef OMP_HUB_TELEMETRY //Config NRF - rf_switch(SW_NRF); NRF24L01_Initialize(); NRF24L01_SetBitrate(NRF24L01_BR_250K); // 250Kbps XN297_Configure(_BV(NRF24L01_00_EN_CRC)); @@ -187,7 +186,7 @@ uint16_t OMP_callback() #ifdef OMP_HUB_TELEMETRY if(packet_sent == 0) { - phase++; // OMP_RX + phase++; // OMP_RX return OMP_WRITE_TIME; } else if(packet_sent == 1) diff --git a/Multiprotocol/WFLY_cyrf6936.ino b/Multiprotocol/WFLY_cyrf6936.ino index d532cba..bc7633f 100644 --- a/Multiprotocol/WFLY_cyrf6936.ino +++ b/Multiprotocol/WFLY_cyrf6936.ino @@ -257,7 +257,7 @@ void WFLY_init() uint8_t ch=0x0A+random(0xfefefefe)%0x0E; if(ch%3==0) ch++; // remove these channels as they seem to not be working... - rf_ch_num=0x0C+(rx_tx_addr[1]%4)*3; // use the start channels which do not seem to work to send the hopping table instead + rf_ch_num=0x0C+(rx_tx_addr[1]&0x03)*3; // use the start channels which do not seem to work to send the hopping table instead #ifdef WFLY_FORCE_ID // data taken from TX dump rx_tx_addr[2]=0xBF; // ID