mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-09-13 08:01:03 +00:00
WPL 5
This commit is contained in:
parent
5ade6bc312
commit
b88f4d40f4
@ -520,7 +520,7 @@ const mm_protocol_definition multi_protocols[] = {
|
|||||||
{PROTO_WL91X, STR_WL91X, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, WL91X_init, WL91X_callback },
|
{PROTO_WL91X, STR_WL91X, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, WL91X_init, WL91X_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(WPL_NRF24L01_INO)
|
#if defined(WPL_NRF24L01_INO)
|
||||||
{PROTO_WPL, STR_WPL, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, WPL_init, WPL_callback },
|
{PROTO_WPL, STR_WPL, NO_SUBTYPE, 0, OPTION_OPTION, 0, 0, SW_NRF, WPL_init, WPL_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(XERALL_NRF24L01_INO)
|
#if defined(XERALL_NRF24L01_INO)
|
||||||
{PROTO_XERALL, STR_XERALL, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, XERALL_init, XERALL_callback },
|
{PROTO_XERALL, STR_XERALL, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, XERALL_init, XERALL_callback },
|
||||||
|
@ -19,6 +19,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#include "iface_xn297.h"
|
#include "iface_xn297.h"
|
||||||
|
|
||||||
#define FORCE_WPL_ORIGINAL_ID
|
#define FORCE_WPL_ORIGINAL_ID
|
||||||
|
//#define WPL_TEST
|
||||||
|
|
||||||
#define WPL_PACKET_PERIOD 9875
|
#define WPL_PACKET_PERIOD 9875
|
||||||
#define WPL_RF_NUM_CHANNELS 4
|
#define WPL_RF_NUM_CHANNELS 4
|
||||||
@ -30,6 +31,9 @@ static void __attribute__((unused)) WPL_send_packet()
|
|||||||
#if 0
|
#if 0
|
||||||
debug("no:%d, rf:%d, ",hopping_frequency_no + (IS_BIND_IN_PROGRESS?0:4),hopping_frequency[hopping_frequency_no + (IS_BIND_IN_PROGRESS?0:4)]);
|
debug("no:%d, rf:%d, ",hopping_frequency_no + (IS_BIND_IN_PROGRESS?0:4),hopping_frequency[hopping_frequency_no + (IS_BIND_IN_PROGRESS?0:4)]);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WPL_TEST
|
||||||
|
memset(hopping_frequency+4,option,4);
|
||||||
|
#endif
|
||||||
XN297_Hopping(hopping_frequency_no + (IS_BIND_IN_PROGRESS?0:4) );
|
XN297_Hopping(hopping_frequency_no + (IS_BIND_IN_PROGRESS?0:4) );
|
||||||
hopping_frequency_no++;
|
hopping_frequency_no++;
|
||||||
hopping_frequency_no &= WPL_RF_NUM_CHANNELS-1; // 4 RF channels
|
hopping_frequency_no &= WPL_RF_NUM_CHANNELS-1; // 4 RF channels
|
||||||
@ -87,6 +91,10 @@ static void __attribute__((unused)) WPL_initialize_txid()
|
|||||||
#ifdef FORCE_WPL_ORIGINAL_ID
|
#ifdef FORCE_WPL_ORIGINAL_ID
|
||||||
memcpy(rx_tx_addr,"\x96\x2A\xA9\x32\xB4",5);
|
memcpy(rx_tx_addr,"\x96\x2A\xA9\x32\xB4",5);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WPL_TEST
|
||||||
|
memcpy(rx_tx_addr,"\x00\x00\x00\x00\x00",5);
|
||||||
|
rx_tx_addr[0] = RX_num;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t WPL_callback()
|
uint16_t WPL_callback()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user