mirror of
				https://github.com/liberatedsystems/RNode_Firmware_CE.git
				synced 2025-11-03 23:04:30 -05:00 
			
		
		
		
	Add support for retrieving packet length on implicit header
This commit is contained in:
		
							parent
							
								
									419a5c6ce3
								
							
						
					
					
						commit
						c9fd5f7d3b
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		
							
								
								
									
										11
									
								
								Radio.cpp
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								Radio.cpp
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -2576,8 +2576,17 @@ void sx128x::handleDio0Rise()
 | 
			
		|||
 | 
			
		||||
        uint8_t rxbuf[2] = {0};
 | 
			
		||||
        executeOpcodeRead(OP_RX_BUFFER_STATUS_8X, rxbuf, 2);
 | 
			
		||||
        _rxPacketLength = rxbuf[0];
 | 
			
		||||
 | 
			
		||||
        // If implicit header mode is enabled, read packet length as payload length instead.
 | 
			
		||||
        // See SX1280 datasheet v3.2, page 92
 | 
			
		||||
        if (_implicitHeaderMode == 0x80) {
 | 
			
		||||
            _rxPacketLength = _payloadLength;
 | 
			
		||||
        } else {
 | 
			
		||||
            _rxPacketLength = rxbuf[0];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        _fifo_rx_addr_ptr = rxbuf[1];
 | 
			
		||||
 | 
			
		||||
        readBuffer(_packet, _rxPacketLength);
 | 
			
		||||
 | 
			
		||||
        if (_onReceive) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue