mirror of
				https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
				synced 2025-11-04 06:51:03 +00:00 
			
		
		
		
	AFHDS2A: Fix LQI to channel
This commit is contained in:
		
							parent
							
								
									aee92737ca
								
							
						
					
					
						commit
						61970b028e
					
				@ -122,7 +122,8 @@ static void AFHDS2A_update_telemetry()
 | 
			
		||||
						telemetry_link=1;
 | 
			
		||||
						break;
 | 
			
		||||
					case AFHDS2A_SENSOR_RX_ERR_RATE:
 | 
			
		||||
						RX_LQI=packet[index+2];
 | 
			
		||||
						if(packet[index+2]<=100)
 | 
			
		||||
							RX_LQI=packet[index+2];
 | 
			
		||||
						break;
 | 
			
		||||
					case AFHDS2A_SENSOR_RX_RSSI:
 | 
			
		||||
						RX_RSSI = -packet[index+2];
 | 
			
		||||
@ -346,11 +347,17 @@ uint16_t ReadAFHDS2A()
 | 
			
		||||
						if(!memcmp(&packet[1], rx_tx_addr, 4))
 | 
			
		||||
						{ // Validate TX address
 | 
			
		||||
							#ifdef AFHDS2A_LQI_CH
 | 
			
		||||
								for(uint8_t sensor=0; sensor<7; sensor++)
 | 
			
		||||
								{//read LQI value for RX output
 | 
			
		||||
									uint8_t index = 9+(4*sensor);
 | 
			
		||||
									if(packet[index]==AFHDS2A_SENSOR_RX_ERR_RATE)
 | 
			
		||||
										RX_LQI=packet[index+2];
 | 
			
		||||
								if(packet[0]==0xAA && packet[9]!=0xFD)
 | 
			
		||||
								{// Normal telemetry packet
 | 
			
		||||
									for(uint8_t sensor=0; sensor<7; sensor++)
 | 
			
		||||
									{//read LQI value for RX output
 | 
			
		||||
										uint8_t index = 9+(4*sensor);
 | 
			
		||||
										if(packet[index]==AFHDS2A_SENSOR_RX_ERR_RATE && packet[index+2]<=100)
 | 
			
		||||
										{
 | 
			
		||||
											RX_LQI=packet[index+2];
 | 
			
		||||
											break;
 | 
			
		||||
										}
 | 
			
		||||
									}
 | 
			
		||||
								}
 | 
			
		||||
							#endif
 | 
			
		||||
							#if defined(AFHDS2A_FW_TELEMETRY) || defined(AFHDS2A_HUB_TELEMETRY)
 | 
			
		||||
 | 
			
		||||
@ -19,7 +19,7 @@
 | 
			
		||||
#define VERSION_MAJOR		1
 | 
			
		||||
#define VERSION_MINOR		2
 | 
			
		||||
#define VERSION_REVISION	1
 | 
			
		||||
#define VERSION_PATCH_LEVEL	85
 | 
			
		||||
#define VERSION_PATCH_LEVEL	86
 | 
			
		||||
 | 
			
		||||
//******************
 | 
			
		||||
// Protocols
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user