Few changes...

This commit is contained in:
Pascal Langer 2021-03-01 13:48:23 +01:00
parent d36af55b84
commit 2ad3c727fd
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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));

View File

@ -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