fixed bug where the correct port wasnt being set per game type
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -72,7 +72,14 @@ def csvWriteOut(firstRun,carData,csvFile):
|
|||||||
|
|
||||||
def runningThread():
|
def runningThread():
|
||||||
global stopThread
|
global stopThread
|
||||||
|
gameType= tkGametype.get()
|
||||||
|
|
||||||
#check everything is connected
|
#check everything is connected
|
||||||
|
if gameType==GameType.BEAMNG.value:
|
||||||
|
portToConnect=BEAMNG_UDP_PORT
|
||||||
|
elif gameType==GameType.FORZA.value:
|
||||||
|
portToConnect=FORZA_UDP_PORT
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
|
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
|
||||||
sock.bind((UDP_IP,portToConnect))
|
sock.bind((UDP_IP,portToConnect))
|
||||||
@@ -91,7 +98,7 @@ def runningThread():
|
|||||||
if csvOut == True:
|
if csvOut == True:
|
||||||
csvFile = open(loggingLocationText.get(),"a")
|
csvFile = open(loggingLocationText.get(),"a")
|
||||||
|
|
||||||
gameType= tkGametype.get()
|
|
||||||
|
|
||||||
while not stopThread:
|
while not stopThread:
|
||||||
data, addr = sock.recvfrom(1024)
|
data, addr = sock.recvfrom(1024)
|
||||||
|
|||||||
Reference in New Issue
Block a user