fixed gear number for beamng

This commit is contained in:
Seth Samuel 2024-12-16 11:23:58 +13:00
parent bd1e361446
commit 077b123620
3 changed files with 19 additions and 1 deletions

17
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,17 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "echo Hello"
},
{
"label": "build exe windows",
"type": "shell",
"command": "pyinstaller.exe --add-data .\\GAME_METHODS\\*:.\\GAME_METHODS\\ --onefile --noconsole --optimize 2 .\\OutGaugeInterpreter.py"
}
]
}

View file

@ -110,6 +110,8 @@ def runningThread():
unpackedData = struct.unpack(BEAMNG_METHODS.BEAMNG_DATA_FORMAT,data) unpackedData = struct.unpack(BEAMNG_METHODS.BEAMNG_DATA_FORMAT,data)
carData = BEAMNG_METHODS.unpackData(unpackedData) carData = BEAMNG_METHODS.unpackData(unpackedData)
kmh=carData[tkDataTypeOut.get()] kmh=carData[tkDataTypeOut.get()]
if tkDataTypeOut.get() == "Gear":
kmh = kmh -1
if csvOut == True: if csvOut == True:
csvWriteOut(firstRun,carData,csvFile) csvWriteOut(firstRun,carData,csvFile)
firstRun=False firstRun=False

View file

@ -1 +0,0 @@
pyserial==3.5