Git why do I have to give you a message every time I push a commit?
This commit is contained in:
parent
839aabb86a
commit
795d8d21d1
@ -20,13 +20,14 @@ controllerDataDict = {'AxisLx': 0, 'AxisLy': 0, 'AxisRx': 0, 'AxisRy': 0, 'BtnBa
|
|||||||
lookup_table = {'ABS_X': 'AxisLx', 'ABS_Y': 'AxisLy', 'ABS_RX': 'AxisRx', 'ABS_RY': 'AxisRy', 'BTN_SELECT': 'BtnBack', 'BTN_START': 'BtnStart', 'BTN_SOUTH': 'BtnA', 'BTN_EAST': 'BtnB', 'BTN_NORTH': 'BtnX', 'BTN_WEST': 'BtnY', 'BTN_THUMBL': 'BtnThumbL', 'BTN_THUMBR': 'BtnThumbR', 'BTN_TL': 'BtnShoulderL', 'BTN_TR': 'BtnShoulderR', 'ABS_Z': 'TriggerL', 'ABS_RZ': 'TriggerR'}
|
lookup_table = {'ABS_X': 'AxisLx', 'ABS_Y': 'AxisLy', 'ABS_RX': 'AxisRx', 'ABS_RY': 'AxisRy', 'BTN_SELECT': 'BtnBack', 'BTN_START': 'BtnStart', 'BTN_SOUTH': 'BtnA', 'BTN_EAST': 'BtnB', 'BTN_NORTH': 'BtnX', 'BTN_WEST': 'BtnY', 'BTN_THUMBL': 'BtnThumbL', 'BTN_THUMBR': 'BtnThumbR', 'BTN_TL': 'BtnShoulderL', 'BTN_TR': 'BtnShoulderR', 'ABS_Z': 'TriggerL', 'ABS_RZ': 'TriggerR'}
|
||||||
def sendData():
|
def sendData():
|
||||||
#Pickle for transmittion
|
#Pickle for transmittion
|
||||||
file = conn.makefile(mode='wb')
|
|
||||||
pickler = pickle.Pickler(file)
|
|
||||||
#print(encodedControllerData)
|
#print(encodedControllerData)
|
||||||
pickler.dump(controllerDataDict)
|
pickler.dump(controllerDataDict)
|
||||||
file.flush()
|
file.flush()
|
||||||
#Create Socket
|
#Create Socket
|
||||||
conn = socket.create_server((ip, port))
|
conn = socket.create_server((ip, port))
|
||||||
|
#Create pickler :D
|
||||||
|
file = conn.makefile(mode='wb')
|
||||||
|
pickler = pickle.Pickler(file)
|
||||||
#Wait for connections before continuing
|
#Wait for connections before continuing
|
||||||
print("Waiting for connection...")
|
print("Waiting for connection...")
|
||||||
conn.accept()
|
conn.accept()
|
||||||
|
Loading…
Reference in New Issue
Block a user