mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 21:08:12 +00:00
Couple of edits...
This commit is contained in:
parent
644c10e994
commit
5d26357025
@ -255,10 +255,10 @@ static void CG023_initialize_txid()
|
|||||||
rx_tx_addr[2] = rx_tx_addr[2] % 0x20;
|
rx_tx_addr[2] = rx_tx_addr[2] % 0x20;
|
||||||
rx_tx_addr[3] = rx_tx_addr[3] % 0x11;
|
rx_tx_addr[3] = rx_tx_addr[3] % 0x11;
|
||||||
|
|
||||||
hopping_frequency[0] = 0x06 + (rx_tx_addr[0]&0x0f);
|
hopping_frequency[0] = 0x06 + ((rx_tx_addr[0]&0x0f) % 0x0f);
|
||||||
hopping_frequency[1] = 0x15 + (rx_tx_addr[1]&0x0f);
|
hopping_frequency[1] = 0x15 + ((rx_tx_addr[1]&0x0f) % 0x0f);
|
||||||
hopping_frequency[2] = 0x24 + (rx_tx_addr[2]&0x0f);
|
hopping_frequency[2] = 0x24 + ((rx_tx_addr[2]&0x0f) % 0x0f);
|
||||||
hopping_frequency[3] = 0x33 + (rx_tx_addr[3]&0x0f);
|
hopping_frequency[3] = 0x33 + ((rx_tx_addr[3]&0x0f) % 0x0f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // CG023 and YD829
|
{ // CG023 and YD829
|
||||||
|
@ -199,7 +199,7 @@ uint16_t CX10_callback() {
|
|||||||
NRF24L01_SetTxRxMode(TXRX_OFF);
|
NRF24L01_SetTxRxMode(TXRX_OFF);
|
||||||
NRF24L01_SetTxRxMode(TX_EN);
|
NRF24L01_SetTxRxMode(TX_EN);
|
||||||
CX10_Write_Packet(1);
|
CX10_Write_Packet(1);
|
||||||
delay(1); // used to be 300µs in deviation but not working so 1ms now
|
delayMicroseconds(400); // 300µs in deviation but not working so using 400µs instead
|
||||||
// switch to RX mode
|
// switch to RX mode
|
||||||
NRF24L01_SetTxRxMode(TXRX_OFF);
|
NRF24L01_SetTxRxMode(TXRX_OFF);
|
||||||
NRF24L01_FlushRx();
|
NRF24L01_FlushRx();
|
||||||
|
@ -469,7 +469,7 @@ static void update_serial_data()
|
|||||||
static void module_reset()
|
static void module_reset()
|
||||||
{
|
{
|
||||||
if(remote_callback)
|
if(remote_callback)
|
||||||
{ // a protocol was loaded, reset the module used
|
{ // previous protocol loaded
|
||||||
remote_callback = 0;
|
remote_callback = 0;
|
||||||
switch(prev_protocol)
|
switch(prev_protocol)
|
||||||
{
|
{
|
||||||
@ -486,8 +486,7 @@ static void module_reset()
|
|||||||
case MODE_DEVO:
|
case MODE_DEVO:
|
||||||
CYRF_Reset();
|
CYRF_Reset();
|
||||||
break;
|
break;
|
||||||
default:
|
default: // MODE_HISKY, MODE_V2X2, MODE_YD717, MODE_KN, MODE_SYMAX, MODE_SLT, MODE_CX10, MODE_CG023, MODE_BAYANG, MODE_ESKY
|
||||||
// MODE_HISKY, MODE_V2X2, MODE_YD717, MODE_KN, MODE_SYMAX, MODE_SLT, MODE_CX10, MODE_CG023, MODE_BAYANG, MODE_ESKY
|
|
||||||
NRF24L01_Reset();
|
NRF24L01_Reset();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ static const uint8_t xn297_scramble[] = {
|
|||||||
|
|
||||||
static const uint16_t xn297_crc_xorout[] = {
|
static const uint16_t xn297_crc_xorout[] = {
|
||||||
0x0000, 0x3448, 0x9BA7, 0x8BBB, 0x85E1, 0x3E8C, // 1st entry is missing, probably never needed
|
0x0000, 0x3448, 0x9BA7, 0x8BBB, 0x85E1, 0x3E8C, // 1st entry is missing, probably never needed
|
||||||
0x451E, 0x18E6, 0x6B24, 0xE7AB, 0x3828, 0x8148, // it's used for 3-byte address w/ 0 byte payload only
|
0x451E, 0x18E6, 0x6B24, 0xE7AB, 0x3828, 0x814B, // it's used for 3-byte address w/ 0 byte payload only
|
||||||
0xD461, 0xF494, 0x2503, 0x691D, 0xFE8B, 0x9BA7,
|
0xD461, 0xF494, 0x2503, 0x691D, 0xFE8B, 0x9BA7,
|
||||||
0x8B17, 0x2920, 0x8B5F, 0x61B1, 0xD391, 0x7401,
|
0x8B17, 0x2920, 0x8B5F, 0x61B1, 0xD391, 0x7401,
|
||||||
0x2138, 0x129F, 0xB3A0, 0x2988};
|
0x2138, 0x129F, 0xB3A0, 0x2988};
|
||||||
|
@ -28,7 +28,7 @@ enum PROTOCOLS
|
|||||||
MODE_DEVO =7, // =>CYRF6936 / DEVO protocol
|
MODE_DEVO =7, // =>CYRF6936 / DEVO protocol
|
||||||
MODE_YD717 = 8, // =>NRF24L01 / YD717 protocol (CX10 red pcb)
|
MODE_YD717 = 8, // =>NRF24L01 / YD717 protocol (CX10 red pcb)
|
||||||
MODE_KN = 9, // =>NRF24L01 / KN protocol
|
MODE_KN = 9, // =>NRF24L01 / KN protocol
|
||||||
MODE_SYMAX = 10, // =>NRF24L01 / SYMAX protocol (SYMAX4 working)
|
MODE_SYMAX = 10, // =>NRF24L01 / SYMAX protocol
|
||||||
MODE_SLT = 11, // =>NRF24L01 / SLT protocol
|
MODE_SLT = 11, // =>NRF24L01 / SLT protocol
|
||||||
MODE_CX10 = 12, // =>NRF24L01 / CX-10 protocol
|
MODE_CX10 = 12, // =>NRF24L01 / CX-10 protocol
|
||||||
MODE_CG023 = 13, // =>NRF24L01 / CG023 protocol
|
MODE_CG023 = 13, // =>NRF24L01 / CG023 protocol
|
||||||
|
Loading…
x
Reference in New Issue
Block a user