mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2026-12-06 07:37:38 +00:00
E010R5: wait for the end of the packet before hopping (#1197)
RF2500_SendPayload() returns once the CYRF6936 buffer is filled, while the end of the packet is still being sent: changing the channel right after it corrupted the last packet before each hop (1 in 6, measured). Wait for TX_IRQ_STATUS TXC first (bounded loop): 100% of the packets received right, same timing.
This commit is contained in:
1 parent
91199e146e
commit
ca86cb0aa3
1 file changed
+2
@@ -70,6 +70,8 @@ uint16_t E010R5_callback()
|
|||||||
case 5:
|
case 5:
|
||||||
return 1183;
|
return 1183;
|
||||||
default:
|
default:
|
||||||
|
//Wait for the end of the packet before changing the channel: RF2500_SendPayload() returns once the CYRF6936 buffer is filled
|
||||||
|
for(uint8_t i=0; i<100 && (CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS)&0x02)==0; i++);
|
||||||
hopping_frequency_no++;
|
hopping_frequency_no++;
|
||||||
hopping_frequency_no &= 3;
|
hopping_frequency_no &= 3;
|
||||||
if(IS_BIND_IN_PROGRESS)
|
if(IS_BIND_IN_PROGRESS)
|
||||||
|
|||||||
Reference in new issue
Block a user