|  |  |  | @ -2,7 +2,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  | import re | 
			
		
	
		
			
				
					|  |  |  |  | import time | 
			
		
	
		
			
				
					|  |  |  |  | import json | 
			
		
	
		
			
				
					|  |  |  |  | import base64 | 
			
		
	
		
			
				
					|  |  |  |  | import requests | 
			
		
	
		
			
				
					|  |  |  |  | import subprocess | 
			
		
	
		
			
				
					|  |  |  |  | from common.timeout import Timeout | 
			
		
	
	
		
			
				
					|  |  |  | @ -40,7 +39,7 @@ def heartbeat(): | 
			
		
	
		
			
				
					|  |  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   while True: | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     try: | 
			
		
	
		
			
				
					|  |  |  |  |       with open(os.path.join(work_dir, "selfdrive", "common", "version.h")) as _versionf: | 
			
		
	
		
			
				
					|  |  |  |  |         version = _versionf.read().split('"')[1] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -63,12 +62,10 @@ def heartbeat(): | 
			
		
	
		
			
				
					|  |  |  |  |         # 'screenshot': screenshot, | 
			
		
	
		
			
				
					|  |  |  |  |         'tmux': tmux, | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     try: | 
			
		
	
		
			
				
					|  |  |  |  |       with Timeout(10): | 
			
		
	
		
			
				
					|  |  |  |  |         requests.post('http://%s/eon/heartbeat/' % MASTER_HOST, json=msg, timeout=5.0) | 
			
		
	
		
			
				
					|  |  |  |  |     except: | 
			
		
	
		
			
				
					|  |  |  |  |       print("Unable to reach master") | 
			
		
	
		
			
				
					|  |  |  |  |     except Exception as e: | 
			
		
	
		
			
				
					|  |  |  |  |       print("Unable to send heartbeat", e) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     time.sleep(5) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |