mirror of
				https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
				synced 2025-10-31 19:41:04 +00:00 
			
		
		
		
	MULTI_TELEMETRY: couple of additions
This commit is contained in:
		
							parent
							
								
									c6221fc60f
								
							
						
					
					
						commit
						f56c9deb00
					
				| @ -13,6 +13,13 @@ | ||||
|  along with Multiprotocol.  If not, see <http://www.gnu.org/licenses/>.
 | ||||
|  */ | ||||
| 
 | ||||
| //******************
 | ||||
| // Version
 | ||||
| //******************
 | ||||
| #define VERSION_MAJOR		1 | ||||
| #define VERSION_MINOR		16 | ||||
| #define VERSION_PATCH_LEVEL	1 | ||||
| 
 | ||||
| //******************
 | ||||
| // Protocols
 | ||||
| //******************
 | ||||
| @ -565,7 +572,7 @@ Type = 0x01 Multimodule Status: | ||||
|    0x04 = protocol is valid | ||||
|    0x08 = module is in binding mode | ||||
|    [5] major | ||||
|    [6] mior | ||||
|    [6] minor | ||||
|    [7-8] patchlevel | ||||
|    version of multi code, should be displayed as major.minor.patchlevel | ||||
| 
 | ||||
|  | ||||
| @ -1004,12 +1004,21 @@ void Mprotocol_serial_init() | ||||
| #if defined(TELEMETRY) | ||||
| void PPM_Telemetry_serial_init() | ||||
| { | ||||
| 	#ifdef MULTI_TELEMETRY | ||||
| 		Mprotocol_serial_init(); | ||||
| 		#ifndef ORANGE_TX | ||||
| 			#ifndef STM32_BOARD | ||||
| 				UCSR0B &= ~(_BV(RXEN0)|_BV(RXCIE0));//rx disable and interrupt
 | ||||
| 			#endif | ||||
| 		#endif | ||||
| 	#else | ||||
| 		if( (protocol==MODE_FRSKYD) || (protocol==MODE_HUBSAN) || (protocol==MODE_AFHDS2A) || (protocol==MODE_BAYANG) ) | ||||
| 			initTXSerial( SPEED_9600 ) ; | ||||
| 		if(protocol==MODE_FRSKYX) | ||||
| 			initTXSerial( SPEED_57600 ) ; | ||||
| 		if(protocol==MODE_DSM) | ||||
| 			initTXSerial( SPEED_125K ) ; | ||||
| 	#endif | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
|  | ||||
| @ -78,8 +78,8 @@ static void multi_send_status() | ||||
|     multi_send_header(MULTI_TELEMETRY_STATUS, 5); | ||||
| 
 | ||||
|     // Build flags
 | ||||
|     uint8_t flags; | ||||
|     if (millis()-last_signal<70) | ||||
|     uint8_t flags=0; | ||||
|     if (IS_INPUT_SIGNAL_on) | ||||
|         flags |= 0x01; | ||||
|     if (mode_select==MODE_SERIAL) | ||||
|         flags |= 0x02; | ||||
| @ -89,16 +89,16 @@ static void multi_send_status() | ||||
|         flags |= 0x08; | ||||
|     Serial_write(flags); | ||||
| 
 | ||||
|     // Version number: 1.15.0
 | ||||
|     Serial_write(1); | ||||
|     Serial_write(15); | ||||
|     Serial_write(0); | ||||
|     // Version number example: 1.16.1
 | ||||
|     Serial_write(VERSION_MAJOR); | ||||
|     Serial_write(VERSION_MINOR); | ||||
|     Serial_write(VERSION_PATCH_LEVEL); | ||||
|     Serial_write(0); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| #ifdef DSM_TELEMETRY | ||||
| #if defined MULTI_TELEMETRY | ||||
| 	#ifdef MULTI_TELEMETRY | ||||
| 		void DSM_frame() | ||||
| 		{ | ||||
| 			if (pkt[0] == 0x80) { | ||||
| @ -387,7 +387,6 @@ void sportSend(uint8_t *p) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| #else | ||||
| 	void sportSend(uint8_t *p) | ||||
| 	{ | ||||
|  | ||||
| @ -76,6 +76,7 @@ | ||||
| 	#undef HUB_TELEMETRY | ||||
| 	#undef SPORT_TELEMETRY | ||||
| 	#undef DSM_TELEMETRY | ||||
| 	#undef MULTI_TELEMETRY | ||||
| #else | ||||
| 	#if not defined(BAYANG_NRF24L01_INO) | ||||
| 		#undef BAYANG_HUB_TELEMETRY | ||||
|  | ||||
| @ -89,7 +89,6 @@ | ||||
| #define	SYMAX_NRF24L01_INO | ||||
| #define	V2X2_NRF24L01_INO | ||||
| #define	YD717_NRF24L01_INO | ||||
| 
 | ||||
| #define	MT99XX_NRF24L01_INO | ||||
| #define	MJXQ_NRF24L01_INO | ||||
| #define	SHENQI_NRF24L01_INO | ||||
| @ -111,6 +110,10 @@ | ||||
| //For ER9X and ERSKY9X it must be commented. For OpenTX it must be uncommented.
 | ||||
| //#define INVERT_TELEMETRY
 | ||||
| 
 | ||||
| //Uncomment to send also Multi status and wrap other telemetry to allow TX to autodetect the format
 | ||||
| //Only for newest OpenTX version
 | ||||
| //#define MULTI_TELEMETRY
 | ||||
| 
 | ||||
| //Comment a line to disable a protocol telemetry
 | ||||
| #define DSM_TELEMETRY				// Forward received telemetry packet directly to TX to be decoded
 | ||||
| #define SPORT_TELEMETRY				// Use FrSkyX SPORT format to send telemetry to TX
 | ||||
| @ -119,7 +122,6 @@ | ||||
| #define AFHDS2A_HUB_TELEMETRY		// Use FrSkyD Hub format to send telemetry to TX
 | ||||
| #define BAYANG_HUB_TELEMETRY		// Use FrSkyD Hub format to send telemetry to TX
 | ||||
| #define HUBSAN_HUB_TELEMETRY		// Use FrSkyD Hub format to send telemetry to TX
 | ||||
| #define MULTI_TELEMETRY				// Send also Multi status and wrap other telemetry to allow TX to autodetect the format
 | ||||
| 
 | ||||
| /****************************/ | ||||
| /*** SERIAL MODE SETTINGS ***/ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user