mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2026-08-24 03:20:12 +00:00
XK: fix bind and normal
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 4
|
#define VERSION_REVISION 4
|
||||||
#define VERSION_PATCH_LEVEL 70
|
#define VERSION_PATCH_LEVEL 71
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
|
|||||||
@@ -246,7 +246,6 @@ uint16_t XK_callback()
|
|||||||
rx = XN297_IsRX();
|
rx = XN297_IsRX();
|
||||||
XN297_SetTxRxMode(TXRX_OFF);
|
XN297_SetTxRxMode(TXRX_OFF);
|
||||||
#endif
|
#endif
|
||||||
XK_send_packet();
|
|
||||||
if(bind_counter)
|
if(bind_counter)
|
||||||
if(--bind_counter==0)
|
if(--bind_counter==0)
|
||||||
{
|
{
|
||||||
@@ -256,6 +255,7 @@ uint16_t XK_callback()
|
|||||||
XN297_SetRXAddr(rx_tx_addr, XK_PAYLOAD_SIZE); // Normal packets address
|
XN297_SetRXAddr(rx_tx_addr, XK_PAYLOAD_SIZE); // Normal packets address
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
XK_send_packet();
|
||||||
#ifdef XK_HUB_TELEMETRY
|
#ifdef XK_HUB_TELEMETRY
|
||||||
if(rx)
|
if(rx)
|
||||||
{
|
{
|
||||||
@@ -312,7 +312,7 @@ void XK_init()
|
|||||||
BIND_IN_PROGRESS; // Autobind protocol
|
BIND_IN_PROGRESS; // Autobind protocol
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bind_counter=0;
|
bind_counter=1;
|
||||||
XK_initialize_txid();
|
XK_initialize_txid();
|
||||||
XK_RF_init();
|
XK_RF_init();
|
||||||
hopping_frequency_no = 0;
|
hopping_frequency_no = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user