Skip to content

Commit

Permalink
PELIKAN: new hopping tables
Browse files Browse the repository at this point in the history
  • Loading branch information
pascallanger committed Nov 30, 2023
1 parent 9cbcafe commit a1737ea
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
45 changes: 27 additions & 18 deletions Multiprotocol/Pelikan_a7105.ino
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,10 @@ const uint8_t PROGMEM pelikan_lite_hopp[][PELIKAN_NUM_RF_CHAN] = {
#endif
#ifdef PELIKAN_SCX24_FORCE_HOP
const uint8_t PROGMEM pelikan_scx24_hopp[][PELIKAN_NUM_RF_CHAN] = {
{ 0x1E,0x32,0x46,0x5A,0x44,0x58,0x2E,0x42,0x56,0x2C,0x40,0x54,0x2A,0x3E,0x52,0x28,0x3C,0x50,0x26,0x3A,0x4E,0x24,0x38,0x4C,0x22,0x36,0x4A,0x20,0x1A },
{ 0x2C,0x44,0x1E,0x52,0x56,0x22,0x3A,0x3E,0x34,0x4C,0x26,0x5A,0x50,0x2A,0x42,0x38,0x2E,0x46,0x20,0x54,0x4A,0x24,0x3C,0x32,0x28,0x40,0x58,0x1B,0x4E },
{ 0x3C,0x4C,0x1E,0x4A,0x5A,0x2C,0x58,0x2A,0x3A,0x56,0x28,0x38,0x26,0x36,0x46,0x34,0x44,0x54,0x42,0x52,0x24,0x50,0x22,0x32,0x4E,0x20,0x40,0x3E,0x17 }
/*TX1*/ { 0x1E,0x32,0x46,0x5A,0x44,0x58,0x2E,0x42,0x56,0x2C,0x40,0x54,0x2A,0x3E,0x52,0x28,0x3C,0x50,0x26,0x3A,0x4E,0x24,0x38,0x4C,0x22,0x36,0x4A,0x20,0x1A },
/*TX2*/ { 0x2C,0x44,0x1E,0x52,0x56,0x22,0x3A,0x3E,0x34,0x4C,0x26,0x5A,0x50,0x2A,0x42,0x38,0x2E,0x46,0x20,0x54,0x4A,0x24,0x3C,0x32,0x28,0x40,0x58,0x1B,0x4E },
/*TX3*/ { 0x3C,0x4C,0x1E,0x4A,0x5A,0x2C,0x58,0x2A,0x3A,0x56,0x28,0x38,0x26,0x36,0x46,0x34,0x44,0x54,0x42,0x52,0x24,0x50,0x22,0x32,0x4E,0x20,0x40,0x3E,0x17 },
/*TX4*/ { 0x46,0x32,0x1E,0x58,0x44,0x5A,0x56,0x42,0x2E,0x54,0x40,0x2C,0x52,0x3E,0x2A,0x50,0x3C,0x28,0x4E,0x3A,0x26,0x4C,0x38,0x24,0x4A,0x36,0x22,0x20,0x1A }
};
#endif

Expand Down Expand Up @@ -346,21 +347,25 @@ void PELIKAN_init()
{
#if defined(PELIKAN_SCX24_FORCE_HOP)
// Hop frequency table
uint8_t num=rx_tx_addr[3] % 0x03;
if(num==1)
{//1
rx_tx_addr[0]=0x10; // hopping freq TX2
rx_tx_addr[1]=0x63; // hopping freq TX2
}
else if(num==2)
{//2
rx_tx_addr[0]=0x81; // hopping freq Ben
rx_tx_addr[1]=0x63; // hopping freq Ben
}
else
{//0
rx_tx_addr[0]=0x12; // hopping freq TX1
rx_tx_addr[1]=0x46; // hopping freq TX1
uint8_t num=rx_tx_addr[3] & 0x03;
switch(num)
{
case 1:
rx_tx_addr[0]=0x10; // hopping freq TX2
rx_tx_addr[1]=0x63; // hopping freq TX2
break;
case 2:
rx_tx_addr[0]=0x81; // hopping freq TX3
rx_tx_addr[1]=0x63; // hopping freq TX3
break;
case 3:
rx_tx_addr[0]=0x36; // hopping freq TX4
rx_tx_addr[1]=0x5C; // hopping freq TX4
break;
default:
rx_tx_addr[0]=0x12; // hopping freq TX1
rx_tx_addr[1]=0x46; // hopping freq TX1
break;
}
for(uint8_t i=0;i<PELIKAN_NUM_RF_CHAN;i++)
hopping_frequency[i]=pgm_read_byte_near(&pelikan_scx24_hopp[num][i]);
Expand All @@ -371,6 +376,10 @@ void PELIKAN_init()
rx_tx_addr[3]=0x19; // TX1
rx_tx_addr[2]=0x80; // TX2
rx_tx_addr[3]=0x22; // TX2
rx_tx_addr[2]=0x30; // TX3
rx_tx_addr[3]=0x18; // TX3
rx_tx_addr[2]=0x30; // TX4
rx_tx_addr[3]=0x17; // TX4
#endif
A7105_WriteReg(A7105_0E_DATA_RATE,0x03);
if(IS_BIND_DONE)
Expand Down
2 changes: 1 addition & 1 deletion Protocols_Details.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ TX: Axial AX-4 2.4GHz transmitter, HPI TF-41 and Panda Hobby 3CH Smart Radio 2.4

Models: Axial SCX24: Deadbolt, Jeep Wranger Rubicon, Chevrolet 1967 C10, B-17 Betty, HPI RF-50 and Panda Hobby: Tetra K1, X1, X2

**Only 2 frequency hopping tables**
**Only 4 frequency hopping tables**

Extended limits supported

Expand Down

0 comments on commit a1737ea

Please sign in to comment.