Pelikan: fix TX and multi ID

Still 1 hopping freq table
This commit is contained in:
pascallanger 2020-01-12 13:00:30 +01:00
parent d092593e5c
commit 8c32cdf5fd
2 changed files with 12 additions and 20 deletions

View File

@ -224,21 +224,11 @@ void A7105_AdjustLOBaseFreq(uint8_t cmd)
offset<<=1;
if(offset < 0)
{
#ifdef PROTO_PELIKAN
if(protocol==PROTO_PELIKAN)
bip = 0x63;
else
#endif
bip = 0x4a; // 2368 MHz
bfp = 0xffff + offset;
}
else
{
#ifdef PROTO_PELIKAN
if(protocol==PROTO_PELIKAN)
bip = 0x64; // default
else
#endif
bip = 0x4b; // 2400 MHz (default)
bfp = offset;
}
@ -310,8 +300,8 @@ const uint8_t PROGMEM HUBSAN_A7105_regs[] = {
#endif
#ifdef PELIKAN_A7105_INO
const uint8_t PROGMEM PELIKAN_A7105_regs[] = {
0xff, 0x42, 0x00, 0x0F, 0x00, 0xff, 0xff ,0x00, 0x00, 0x00, 0x00, 0x01, 0x21, 0xb7, 0x01, 0x50, // 00 - 0f
0x96, 0x64, 0x00, 0x02, 0x16, 0x2f, 0x12, 0x00, 0x62, 0x80, 0x80, 0x00, 0x0a, 0x32, 0xc3, 0x07, // 10 - 1f
0xff, 0x42, 0x00, 0x0F, 0x00, 0xff, 0xff ,0x00, 0x00, 0x00, 0x00, 0x01, 0x21, 0x05, 0x01, 0x50, // 00 - 0f
0x9e, 0x4b, 0x00, 0x02, 0x16, 0x2b, 0x12, 0x00, 0x62, 0x80, 0x80, 0x00, 0x0a, 0x32, 0xc3, 0x07, // 10 - 1f
0x16, 0x00, 0x00, 0xff, 0x00, 0x00, 0x3b, 0x00, 0x1f, 0x47, 0x80, 0x03, 0x01, 0x45, 0x18, 0x00, // 20 - 2f
0x01, 0x0f // 30 - 31
};

View File

@ -18,7 +18,7 @@
#include "iface_a7105.h"
#define PELIKAN_FORCE_ID
//#define PELIKAN_FORCE_ID
#define PELIKAN_BIND_COUNT 400
#define PELIKAN_BIND_RF 0x3C
@ -136,15 +136,17 @@ uint16_t initPelikan()
if(IS_BIND_IN_PROGRESS)
A7105_WriteReg(A7105_03_FIFOI,0x10);
//ID
//ID from dump
#ifdef PELIKAN_FORCE_ID
rx_tx_addr[0]=0x0D;
rx_tx_addr[1]=0xF4;
rx_tx_addr[2]=0x50;
rx_tx_addr[3]=0x18;
rx_tx_addr[0]=0x0D; // hopping freq
rx_tx_addr[1]=0xF4; // hopping freq
rx_tx_addr[2]=0x50; // ID
rx_tx_addr[3]=0x18; // ID
#endif
// Fill frequency table
rx_tx_addr[0]=0x0D; // hopping freq
rx_tx_addr[1]=0xF4; // hopping freq
for(uint8_t i=0;i<PELIKAN_NUM_RF_CHAN;i++)
hopping_frequency[i]=pgm_read_byte_near(&pelikan_hopp[0][i]);