From 231862f06b294bdef58e21ba6faa85a11eed65c6 Mon Sep 17 00:00:00 2001 From: Seth Date: Mon, 2 Dec 2024 12:43:27 +1300 Subject: [PATCH] connectd logging --- OutGaugeInterpreter.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OutGaugeInterpreter.py b/OutGaugeInterpreter.py index fee2daa..b91c928 100644 --- a/OutGaugeInterpreter.py +++ b/OutGaugeInterpreter.py @@ -76,6 +76,11 @@ def runningThread(): print("please check connection to arduino and verify the correct serial port") exit() + csvOut = tkLoggingEnabled.get() + + if csvOut == True: + csvFile = open(gameType.value+"_"+str(int(time.time()))+'.csv',"a") + gameType= tkGametype.get() while not stopThread: @@ -94,6 +99,7 @@ def runningThread(): if csvOut == True: csvWriteOut(firstRun,carData,csvFile) firstRun=False + try: toPi.write(str(kmh).encode()+":".encode()) except: @@ -209,12 +215,6 @@ while gameSelected == False: print("please select a number from the list") - -if csvOut == True: - csvFile = open(gameType.value+"_"+str(int(time.time()))+'.csv',"a") - - - print("ready:\n")