mirror of
				https://github.com/kemenril/iR-APRSISD.git
				synced 2025-03-05 20:51:35 -08:00 
			
		
		
		
	Fixed process by which the comment is assembled to be functionally identical, but more sensible.
This commit is contained in:
		
							parent
							
								
									7d0531eb26
								
							
						
					
					
						commit
						66f2a95580
					
				
							
								
								
									
										19
									
								
								ir-aprsisd
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								ir-aprsisd
									
									
									
									
									
								
							|  | @ -309,10 +309,6 @@ def sendAPRS(device, DevID, ARPreamble, tstamp, lat, long, alt, course, speed, c | |||
| 	if device: | ||||
| 		gateInfo = gateInfo + device | ||||
| 
 | ||||
| 	#In the format we're using, APRS comments can be 36 characters | ||||
| 	# ... but APRS-IS doesn't seem to care, so leave this off. | ||||
| 	#comment	= comment[:36] | ||||
| 
 | ||||
| 	aprsPacket	= ''.join([getSSID(DevID),ARPreamble, ':@', time.strftime("%d%H%Mz",tstamp), pos])  | ||||
| 
 | ||||
| 	#Check to make sure the update is new: | ||||
|  | @ -327,9 +323,18 @@ def sendAPRS(device, DevID, ARPreamble, tstamp, lat, long, alt, course, speed, c | |||
| 	#Same with altitude: | ||||
| 	if alt: | ||||
| 		#We need six digits of altitude. | ||||
| 		aprsPacket	= aprsPacket + "/A=" + str(round(alt)).zfill(6)[0:6] | ||||
| 	# Regardless: | ||||
| 	aprsPacket		= aprsPacket + comment + gateInfo | ||||
| 		comment = "/A=" + str(round(alt)).zfill(6)[0:6] + comment | ||||
| 
 | ||||
| 	#Regardless: | ||||
| 	comment = comment + gateInfo | ||||
| 
 | ||||
| 	#We have the whole comment in one place now. | ||||
| 	#In the format we're using, APRS comments can be 36 characters | ||||
|         # ... but APRS-IS doesn't seem to care, so leave this off. | ||||
|         #comment        = comment[:36] | ||||
| 
 | ||||
| 	aprsPacket		= aprsPacket + comment | ||||
| 
 | ||||
| 	try: | ||||
| 		aprslib.parse(aprsPacket)	# For syntax | ||||
| 		AIS.sendall(aprsPacket) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue