made UI a little more clear
This commit is contained in:
parent
5d676828d4
commit
9ec76323d7
3 changed files with 6 additions and 4 deletions
|
|
@ -17,14 +17,17 @@ portToConnect= 0
|
|||
dataFormat = ""
|
||||
|
||||
while gameSelected == False:
|
||||
gameNo = input("1:BEAMNG\n2:FORZA")
|
||||
if gameNo == 1:
|
||||
gameNo = input("1:BEAMNG\n2:FORZA\n")
|
||||
if gameNo == "1":
|
||||
portToConnect = BEAMNG_UDP_PORT
|
||||
dataFormat =BEAMNG_METHODS.BEAMNG_DATA_FORMAT
|
||||
gameSelected = True
|
||||
elif gameNo ==2:
|
||||
print("BeamNG Selected")
|
||||
elif gameNo == "2":
|
||||
portToConnect = FORZA_UDP_PORT
|
||||
dataFormat = FORZA_METHODS.FROZA_DATA_FORMAT
|
||||
print("Forza Selected")
|
||||
gameSelected=True
|
||||
else:
|
||||
print("please select a number from the list")
|
||||
|
||||
|
|
@ -48,7 +51,6 @@ while connectedArduino == False:
|
|||
|
||||
print("ready:\n")
|
||||
|
||||
|
||||
while True:
|
||||
data, addr = sock.recvfrom(1024)
|
||||
unpackedData = struct.unpack(dataFormat,data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue