Skip to content

Commit 9c6c55f

Browse files
author
Pascal Langer
committed
E010r5: added 2 TX IDs
1 parent 5b9ca3b commit 9c6c55f

4 files changed

Lines changed: 36 additions & 18 deletions

File tree

Multiprotocol/CYRF6936_SPI.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,5 @@ static void __attribute__((unused)) CYRF_GFSK1M_SendPayload(uint8_t *buffer, uin
385385
CYRF_WriteRegisterMulti(CYRF_20_TX_BUFFER, buffer, len); // Add the remaining bytes to the buffer
386386
}
387387
}
388-
static void __attribute__((unused)) CYRF_GFSK1M_SetPower()
389-
{
390-
CYRF_SetPower(0x00);
391-
}
388+
#define CYRF_GFSK1M_SetPower() CYRF_SetPower(0x00)
392389
#endif

Multiprotocol/E010R5_cyrf6936.ino

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,28 +93,49 @@ uint16_t ReadE010R5()
9393
uint16_t initE010R5()
9494
{
9595
BIND_IN_PROGRESS; // Autobind protocol
96-
bind_counter = 2600;
96+
bind_counter = 2600;
9797

98-
//RF2500 emu init
98+
//RF2500 emu init
9999
RF2500_Init(E010R5_PAYLOAD_SIZE, false); // 14 bytes, not scrambled
100-
RF2500_SetTXAddr((uint8_t*)"\x0E\x54\x96\xEE"); // Same address for bind and normal packets
100+
RF2500_SetTXAddr((uint8_t*)"\x0E\x54\x96\xEE"); // Same address for bind and normal packets
101101

102-
#ifdef E010R5_FORCE_ID
103-
hopping_frequency[0]=0x30; //48
104-
hopping_frequency[1]=0x45; //69
105-
hopping_frequency[2]=0x40; //64
106-
hopping_frequency[3]=0x35; //53
107-
rx_tx_addr[0]=0x00;
108-
rx_tx_addr[1]=0x45;
109-
rx_tx_addr[2]=0x46;
102+
#ifdef E010R5_FORCE_ID
103+
switch(rx_tx_addr[3]%3)
104+
{
105+
case 0:
106+
//TX1
107+
hopping_frequency[0]=0x35; //53
108+
hopping_frequency[1]=0x30; //48
109+
rx_tx_addr[1]=0x45;
110+
rx_tx_addr[2]=0x46;
111+
break;
112+
case 1:
113+
//TX2
114+
hopping_frequency[0]=0x35; //53
115+
hopping_frequency[1]=0x3C; //60
116+
rx_tx_addr[1]=0x1B;
117+
rx_tx_addr[2]=0x9E;
118+
break;
119+
default:
120+
//TX3
121+
hopping_frequency[0]=0x30; //48
122+
hopping_frequency[1]=0x38; //56
123+
rx_tx_addr[1]=0x17;
124+
rx_tx_addr[2]=0x0D;
125+
break;
126+
}
110127
#endif
128+
rx_tx_addr[0]=0x00;
129+
// This is the same as the E010 v1...
130+
hopping_frequency[2]=hopping_frequency[0]+0x10;
131+
hopping_frequency[3]=hopping_frequency[1]+0x10;
111132

112133
E010R5_build_data_packet();
113134
RF2500_RFChannel(hopping_frequency[0]);
114135
hopping_frequency_no=0;
115136
packet_count=0;
116137

117-
return 3400;
138+
return 3400;
118139
}
119140

120141
#endif

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 2
22-
#define VERSION_PATCH_LEVEL 10
22+
#define VERSION_PATCH_LEVEL 11
2323

2424
//******************
2525
// Protocols

Protocols_Details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
832832
## E010R5 - *81*
833833
Models: E010 R5 red boards, JJRC H36, H36F and H36S
834834

835-
**Only 1 ID available**. More IDs can be added if you send me your "unused" original TX.
835+
**Only 3 IDs are available**. More IDs can be added if you send me your "unused" original TX.
836836

837837
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
838838
---|---|---|---|---|---|---|---|---|---

0 commit comments

Comments
 (0)