sample
This commit is contained in:
		
							parent
							
								
									af87e9d7b6
								
							
						
					
					
						commit
						6c27b1ec7b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								main.py
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								main.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -8,7 +8,7 @@ import libevdev
 | 
			
		|||
MULTICAST_TTL = 4
 | 
			
		||||
def send(socket,x,y):
 | 
			
		||||
 | 
			
		||||
    packet = struct.pack('<HH', int((float(x_coor)/32767.0)*1920), int((float(y_coor)/32767.0)*1080))
 | 
			
		||||
    packet = struct.pack('<HH', x,y)
 | 
			
		||||
                        
 | 
			
		||||
                        # Send the packet over UDP
 | 
			
		||||
    sock.sendto(packet, (dest_ip, dest_port))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue