| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -82,9 +82,6 @@ def send_thread(joystick): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    dat.testJoystick.buttons = [joystick.cancel] | 
					 | 
					 | 
					 | 
					    dat.testJoystick.buttons = [joystick.cancel] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    joystick_sock.send(dat.to_bytes()) | 
					 | 
					 | 
					 | 
					    joystick_sock.send(dat.to_bytes()) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    print('\n' + ', '.join(f'{name}: {round(v, 3)}' for name, v in joystick.axes_values.items())) | 
					 | 
					 | 
					 | 
					    print('\n' + ', '.join(f'{name}: {round(v, 3)}' for name, v in joystick.axes_values.items())) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if "WEB" in os.environ: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      import requests | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      requests.get("http://"+os.environ["WEB"]+":5000/control/%f/%f" % tuple([joystick.axes_values[a] for a in joystick.axes_order][::-1]), timeout=None) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    rk.keep_time() | 
					 | 
					 | 
					 | 
					    rk.keep_time() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def joystick_thread(joystick): | 
					 | 
					 | 
					 | 
					def joystick_thread(joystick): | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -101,7 +98,7 @@ if __name__ == '__main__': | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  parser.add_argument('--gamepad', action='store_true', help='Use gamepad configuration instead of joystick') | 
					 | 
					 | 
					 | 
					  parser.add_argument('--gamepad', action='store_true', help='Use gamepad configuration instead of joystick') | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  args = parser.parse_args() | 
					 | 
					 | 
					 | 
					  args = parser.parse_args() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  if not Params().get_bool("IsOffroad") and "ZMQ" not in os.environ and "WEB" not in os.environ: | 
					 | 
					 | 
					 | 
					  if not Params().get_bool("IsOffroad") and "ZMQ" not in os.environ: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    print("The car must be off before running joystickd.") | 
					 | 
					 | 
					 | 
					    print("The car must be off before running joystickd.") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    exit() | 
					 | 
					 | 
					 | 
					    exit() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |