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