mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-03 03:57:51 +00:00
Change option value on the fly
This commit is contained in:
parent
7b7ff51f4c
commit
417e63e658
@ -50,7 +50,7 @@ static void __attribute__((unused)) frsky2way_init(uint8_t bind)
|
||||
val=bind ? 0x43 : 0x03;
|
||||
CC2500_WriteReg(reg,val);
|
||||
}
|
||||
|
||||
LastOption = option ;
|
||||
CC2500_SetTxRxMode(TX_EN);
|
||||
CC2500_SetPower();
|
||||
|
||||
@ -206,6 +206,12 @@ uint16_t ReadFrSky_2way()
|
||||
CC2500_SetTxRxMode(TX_EN);
|
||||
CC2500_SetPower(); // Set tx_power
|
||||
}
|
||||
|
||||
if ( LastOption != option )
|
||||
{
|
||||
CC2500_WriteReg(CC2500_0C_FSCTRL0,option); // Frequency offset hack
|
||||
LastOption = option ;
|
||||
}
|
||||
CC2500_Strobe(CC2500_SIDLE);
|
||||
CC2500_WriteReg(CC2500_0A_CHANNR, get_chan_num(counter % 47));
|
||||
CC2500_WriteReg(CC2500_23_FSCAL3, 0x89);
|
||||
|
Loading…
x
Reference in New Issue
Block a user