mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 17:58:13 +00:00
Few changes...
This commit is contained in:
parent
d36af55b84
commit
2ad3c727fd
@ -356,7 +356,8 @@ uint16_t MT99XX_callback()
|
|||||||
{
|
{
|
||||||
// set tx address for data packets
|
// set tx address for data packets
|
||||||
XN297_SetTXAddr(rx_tx_addr, 5);
|
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++)
|
for(uint8_t i=0;i<16;i++)
|
||||||
hopping_frequency[i] += channel_offset;
|
hopping_frequency[i] += channel_offset;
|
||||||
BIND_DONE;
|
BIND_DONE;
|
||||||
|
@ -118,7 +118,6 @@ static void __attribute__((unused)) OMP_RF_init()
|
|||||||
|
|
||||||
#ifdef OMP_HUB_TELEMETRY
|
#ifdef OMP_HUB_TELEMETRY
|
||||||
//Config NRF
|
//Config NRF
|
||||||
rf_switch(SW_NRF);
|
|
||||||
NRF24L01_Initialize();
|
NRF24L01_Initialize();
|
||||||
NRF24L01_SetBitrate(NRF24L01_BR_250K); // 250Kbps
|
NRF24L01_SetBitrate(NRF24L01_BR_250K); // 250Kbps
|
||||||
XN297_Configure(_BV(NRF24L01_00_EN_CRC));
|
XN297_Configure(_BV(NRF24L01_00_EN_CRC));
|
||||||
|
@ -257,7 +257,7 @@ void WFLY_init()
|
|||||||
uint8_t ch=0x0A+random(0xfefefefe)%0x0E;
|
uint8_t ch=0x0A+random(0xfefefefe)%0x0E;
|
||||||
if(ch%3==0)
|
if(ch%3==0)
|
||||||
ch++; // remove these channels as they seem to not be working...
|
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
|
#ifdef WFLY_FORCE_ID // data taken from TX dump
|
||||||
rx_tx_addr[2]=0xBF; // ID
|
rx_tx_addr[2]=0xBF; // ID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user