prevent empty frames
This commit is contained in:
		
							
								
								
									
										13
									
								
								owrx/aprs.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								owrx/aprs.py
									
									
									
									
									
								
							| @@ -155,18 +155,19 @@ class AprsParser(object): | |||||||
|  |  | ||||||
|         if information[0] == "!" or information[0] == "=": |         if information[0] == "!" or information[0] == "=": | ||||||
|             # position without timestamp |             # position without timestamp | ||||||
|             information = information[1:] |             aprsData.update(self.parseRegularAprsData(information[1:])) | ||||||
|         elif information[0] == "/" or information[0] == "@": |         elif information[0] == "/" or information[0] == "@": | ||||||
|             # position with timestamp |             # position with timestamp | ||||||
|             # TODO parse timestamp |             # TODO parse timestamp | ||||||
|             information = information[8:] |             aprsData.update(self.parseRegularAprsData(information[8:])) | ||||||
|         else: |  | ||||||
|             return {} |  | ||||||
|  |  | ||||||
|  |         return aprsData | ||||||
|  |  | ||||||
|  |     def parseRegularAprsData(self, information): | ||||||
|         if self.hasCompressedCoordinatesx(information): |         if self.hasCompressedCoordinatesx(information): | ||||||
|             aprsData.update(self.parseCompressedCoordinates(information[0:10])) |             aprsData = self.parseCompressedCoordinates(information[0:10]) | ||||||
|             aprsData["comment"] = information[10:] |             aprsData["comment"] = information[10:] | ||||||
|         else: |         else: | ||||||
|             aprsData.update(self.parseUncompressedCoordinates(information[0:19])) |             aprsData = self.parseUncompressedCoordinates(information[0:19]) | ||||||
|             aprsData["comment"] = information[19:] |             aprsData["comment"] = information[19:] | ||||||
|         return aprsData |         return aprsData | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jakob Ketterl
					Jakob Ketterl