mirror of
				https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
				synced 2025-11-04 06:51:03 +00:00 
			
		
		
		
	Q90C test
This commit is contained in:
		
							parent
							
								
									b4a1f175c6
								
							
						
					
					
						commit
						a5f627a2d6
					
				@ -19,7 +19,7 @@
 | 
				
			|||||||
#define VERSION_MAJOR		1
 | 
					#define VERSION_MAJOR		1
 | 
				
			||||||
#define VERSION_MINOR		3
 | 
					#define VERSION_MINOR		3
 | 
				
			||||||
#define VERSION_REVISION	1
 | 
					#define VERSION_REVISION	1
 | 
				
			||||||
#define VERSION_PATCH_LEVEL	18
 | 
					#define VERSION_PATCH_LEVEL	19
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//******************
 | 
					//******************
 | 
				
			||||||
// Protocols
 | 
					// Protocols
 | 
				
			||||||
 | 
				
			|||||||
@ -43,7 +43,11 @@ static void __attribute__((unused)) Q90C_send_packet()
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		memcpy(packet, rx_tx_addr, 4);
 | 
							memcpy(packet, rx_tx_addr, 4);
 | 
				
			||||||
		memcpy(&packet[4], hopping_frequency, 3);
 | 
							memcpy(&packet[4], hopping_frequency, 3);
 | 
				
			||||||
		packet[10] = rx_tx_addr[4];
 | 
							packet[7] = 0x1e;	// 2e on Saimat 1???
 | 
				
			||||||
 | 
							packet[8] = 0x00;
 | 
				
			||||||
 | 
							packet[9] = 0x00;
 | 
				
			||||||
 | 
							packet[10] = 0x4B;
 | 
				
			||||||
 | 
							packet[11] = 0x4E;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@ -74,25 +78,23 @@ static void __attribute__((unused)) Q90C_send_packet()
 | 
				
			|||||||
		packet[4] = 0x1e;									// T trim 00-1e-3c
 | 
							packet[4] = 0x1e;									// T trim 00-1e-3c
 | 
				
			||||||
		packet[5] = 0x1e;									// R trim 3c-1e-00
 | 
							packet[5] = 0x1e;									// R trim 3c-1e-00
 | 
				
			||||||
		packet[6] = 0x1e;									// E trim 00-1e-3c
 | 
							packet[6] = 0x1e;									// E trim 00-1e-3c
 | 
				
			||||||
 | 
							packet[7] = 0x1e;									// A trim 00-1e-3c
 | 
				
			||||||
 | 
							packet[8] = 0x00;									// flags: 3 position flight mode (Angle - Horizon - Acro), VTX Toggle HIGH = next vTX frequency
 | 
				
			||||||
 | 
							packet[9] = 0x00;
 | 
				
			||||||
		packet[10] = packet_count++;
 | 
							packet[10] = packet_count++;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	packet[7] = 0x1e;									// A trim 00-1e-3c
 | 
					 | 
				
			||||||
	packet[8] = 0x00;									// flags: 3 position flight mode (Angle - Horizon - Acro), VTX Toggle HIGH = next vTX frequency
 | 
					 | 
				
			||||||
	packet[9] = 0x00;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    uint8_t sum=0;
 | 
					 | 
				
			||||||
	// checksum
 | 
						// checksum
 | 
				
			||||||
	if(IS_BIND_IN_PROGRESS)
 | 
						if(IS_BIND_DONE)
 | 
				
			||||||
		packet[11]=0x4E;
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
						    uint8_t sum=0;
 | 
				
			||||||
		for (uint8_t i = 0; i < Q90C_PACKET_SIZE - 1; i++)
 | 
							for (uint8_t i = 0; i < Q90C_PACKET_SIZE - 1; i++)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			sum += packet[i];
 | 
								sum += packet[i];
 | 
				
			||||||
			debug("%02X ", packet[i]);
 | 
								debug("%02X ", packet[i]);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							packet[11] = sum ^ crc8;
 | 
				
			||||||
		debugln("%02X",packet[11]);
 | 
							debugln("%02X",packet[11]);
 | 
				
			||||||
		packet[11] = sum ^ (? 0xc6 : crc8);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	XN297L_SetFreqOffset();									// Set frequency offset
 | 
						XN297L_SetFreqOffset();									// Set frequency offset
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user