mirror of
				https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
				synced 2025-10-31 19:41:04 +00:00 
			
		
		
		
	Fix DSMR
This commit is contained in:
		
							parent
							
								
									d03a8787d1
								
							
						
					
					
						commit
						7b9941e537
					
				| @ -298,7 +298,7 @@ uint16_t DSM_callback() | |||||||
| 	#define DSM_READ_DELAY		600				// Time before write to check read phase, and switch channels. Was 400 but 600 seems what the 328p needs to read a packet
 | 	#define DSM_READ_DELAY		600				// Time before write to check read phase, and switch channels. Was 400 but 600 seems what the 328p needs to read a packet
 | ||||||
| 	#if defined DSM_TELEMETRY | 	#if defined DSM_TELEMETRY | ||||||
| 		uint8_t rx_phase; | 		uint8_t rx_phase; | ||||||
| 		uint8_t len; | 		uint8_t length; | ||||||
| 	#endif | 	#endif | ||||||
| 	uint8_t start; | 	uint8_t start; | ||||||
| 	//debugln("P=%d",phase);
 | 	//debugln("P=%d",phase);
 | ||||||
| @ -474,15 +474,15 @@ uint16_t DSM_callback() | |||||||
| 			if((rx_phase & 0x07) == 0x02) | 			if((rx_phase & 0x07) == 0x02) | ||||||
| 			{ // good data (complete with no errors)
 | 			{ // good data (complete with no errors)
 | ||||||
| 				CYRF_WriteRegister(CYRF_07_RX_IRQ_STATUS, 0x80);	// need to set RXOW before data read
 | 				CYRF_WriteRegister(CYRF_07_RX_IRQ_STATUS, 0x80);	// need to set RXOW before data read
 | ||||||
| 				len=CYRF_ReadRegister(CYRF_09_RX_COUNT); | 				length=CYRF_ReadRegister(CYRF_09_RX_COUNT); | ||||||
| 				if(len>TELEMETRY_BUFFER_SIZE-2) | 				if(length>TELEMETRY_BUFFER_SIZE-2) | ||||||
| 					len=TELEMETRY_BUFFER_SIZE-2; | 					length=TELEMETRY_BUFFER_SIZE-2; | ||||||
| 				CYRF_ReadDataPacketLen(packet_in+1, len); | 				CYRF_ReadDataPacketLen(packet_in+1, length); | ||||||
| 				#ifdef DSM_DEBUG_FWD_PGM | 				#ifdef DSM_DEBUG_FWD_PGM | ||||||
| 					//debug(" %02X", packet_in[1]);
 | 					//debug(" %02X", packet_in[1]);
 | ||||||
| 					if(packet_in[1]==9) | 					if(packet_in[1]==9) | ||||||
| 					{ | 					{ | ||||||
| 						for(uint8_t i=0;i<len;i++) | 						for(uint8_t i=0;i<length;i++) | ||||||
| 							debug(" %02X", packet_in[i+1]); | 							debug(" %02X", packet_in[i+1]); | ||||||
| 						debugln(""); | 						debugln(""); | ||||||
| 					} | 					} | ||||||
| @ -612,10 +612,10 @@ void DSM_init() | |||||||
| 		{ | 		{ | ||||||
| 			//SUB_PROTO_VALID;
 | 			//SUB_PROTO_VALID;
 | ||||||
| 			CYRF_GetMfgData(cyrfmfg_id); | 			CYRF_GetMfgData(cyrfmfg_id); | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 			//Model match
 | 			//Model match
 | ||||||
| 			cyrfmfg_id[3]^=RX_num; | 			cyrfmfg_id[3]^=RX_num; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	//Calc sop_col
 | 	//Calc sop_col
 | ||||||
| 	sop_col = (cyrfmfg_id[0] + cyrfmfg_id[1] + cyrfmfg_id[2] + 2) & 0x07; | 	sop_col = (cyrfmfg_id[0] + cyrfmfg_id[1] + cyrfmfg_id[2] + 2) & 0x07; | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ | |||||||
| #define VERSION_MAJOR		1 | #define VERSION_MAJOR		1 | ||||||
| #define VERSION_MINOR		3 | #define VERSION_MINOR		3 | ||||||
| #define VERSION_REVISION	4 | #define VERSION_REVISION	4 | ||||||
| #define VERSION_PATCH_LEVEL	25 | #define VERSION_PATCH_LEVEL	26 | ||||||
| 
 | 
 | ||||||
| #define MODE_SERIAL 0 | #define MODE_SERIAL 0 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1929,7 +1929,7 @@ ARM| | |||||||
| 
 | 
 | ||||||
| ## JIABAILE - *102* | ## JIABAILE - *102* | ||||||
| 
 | 
 | ||||||
| Models: JBL-430x without gyro | Models: JBL-430x 1:43 car without gyro | ||||||
| 
 | 
 | ||||||
| You must assign a different RX number for each car. Otherwise the new car ID will overwrite the previous one. | You must assign a different RX number for each car. Otherwise the new car ID will overwrite the previous one. | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user