Skip to content

Commit 9e099bc

Browse files
committed
WPL 3rd try
1 parent 48b7430 commit 9e099bc

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Multiprotocol/Multiprotocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#define VERSION_MAJOR 1
2020
#define VERSION_MINOR 3
2121
#define VERSION_REVISION 4
22-
#define VERSION_PATCH_LEVEL 51
22+
#define VERSION_PATCH_LEVEL 52
2323

2424
#define MODE_SERIAL 0
2525

Multiprotocol/WPL_nrf24l01.ino

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Multiprotocol is distributed in the hope that it will be useful,
2727

2828
static void __attribute__((unused)) WPL_send_packet()
2929
{
30+
#if 0
31+
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)]);
32+
#endif
3033
XN297_Hopping(hopping_frequency_no + (IS_BIND_IN_PROGRESS?0:4) );
3134
hopping_frequency_no++;
3235
hopping_frequency_no &= WPL_RF_NUM_CHANNELS-1; // 4 RF channels
@@ -47,7 +50,7 @@ static void __attribute__((unused)) WPL_send_packet()
4750
packet[4 ] = convert_channel_s8b(CH2); // Steering
4851
packet[5 ] = convert_channel_16b_limit(CH3,0x22,0x5E); // Steering trim
4952
packet[6 ] = rx_tx_addr[3]; // 0x32??
50-
packet[7 ] = convert_channel_s8b(CH4); // Aux
53+
packet[7 ] = 0x80; //convert_channel_s8b(CH4); // Aux
5154
packet[9 ] = 0x80 // ?? Bound
5255
| GET_FLAG(CH5_SW, 0x08) // Headlights 100%=on
5356
| GET_FLAG(CH6_SW, 0x04) // Throttle rate 100%=high
@@ -61,6 +64,11 @@ static void __attribute__((unused)) WPL_send_packet()
6164
XN297_SetPower();
6265
XN297_SetTxRxMode(TX_EN);
6366
XN297_WritePayload(packet, WPL_PAYLOAD_SIZE);
67+
#if 0
68+
for(uint8_t i=0; i<WPL_PAYLOAD_SIZE; i++)
69+
debug(" %02X",packet[i]);
70+
debugln("");
71+
#endif
6472
}
6573

6674
static void __attribute__((unused)) WPL_RF_init()
@@ -143,4 +151,4 @@ P[9] = 80 ?? bound?, Throttle and Steering rate low, Headlights off
143151
|08 -> Headlights on
144152
P[10..14] = 00 ??
145153
P[15] = sum(P[0..14])+66 why 66...
146-
*/
154+
*/

0 commit comments

Comments
 (0)