GD00X: Implement general ID/Freq

This commit is contained in:
Pascal Langer 2018-11-25 20:52:44 +01:00
parent d8224ebefe
commit 9a61b2701e
2 changed files with 10 additions and 7 deletions

View File

@ -18,7 +18,7 @@ Multiprotocol is distributed in the hope that it will be useful,
#include "iface_nrf24l01.h"
#define FORCE_GD00X_ORIGINAL_ID
//#define FORCE_GD00X_ORIGINAL_ID
#define GD00X_INITIAL_WAIT 500
#define GD00X_PACKET_PERIOD 3500
@ -81,13 +81,16 @@ static void __attribute__((unused)) GD00X_init()
static void __attribute__((unused)) GD00X_initialize_txid()
{
uint8_t start=76+(rx_tx_addr[0]&0x03);
for(uint8_t i=0; i<4;i++)
hopping_frequency[i]=start-(i<<1);
#ifdef FORCE_GD00X_ORIGINAL_ID
rx_tx_addr[0]=0x1F;
rx_tx_addr[1]=0x39;
rx_tx_addr[2]=0x12;
rx_tx_addr[3]=0x13;
rx_tx_addr[0]=0x1F; // or 0xA5 or 0x26
rx_tx_addr[1]=0x39; // or 0x37 or 0x35
rx_tx_addr[2]=0x12; // Constant on 3 TXs
rx_tx_addr[3]=0x13; // Constant on 3 TXs
for(uint8_t i=0; i<4;i++)
hopping_frequency[i]=79-(i<<1);
hopping_frequency[i]=79-(i<<1); // or 77 or 78
#endif
}

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_REVISION 1
#define VERSION_PATCH_LEVEL 21
#define VERSION_PATCH_LEVEL 22
//******************
// Protocols