Fix Elise

This commit is contained in:
Fierelier 2022-10-27 19:18:30 +02:00
parent 636fcf350f
commit 8bdc73741d
1 changed files with 22 additions and 7 deletions

View File

@ -555,7 +555,7 @@ topBias = {
"cts": 0.1,
"db9": 0.7,
"eclipsegt": 0.4,
"elise": 0.0,
"elise": 0.6,
"fordgt": 0.6,
"gallardo": 0.6,
"gti": 0.2,
@ -578,6 +578,10 @@ topBias = {
"viper": 0.4
}
gripScale = {
"elise": 0.7
}
parsedVlt = []
for line in properties.split("\n"):
line = line.strip(" \t\r")
@ -669,13 +673,24 @@ for car in carlist:
continue
if line[0] == "update_field":
if not (line[1] in ["ecar","pvehicle"]) and isCarLine and not isTopLine:
tline = findTopLine(parsedVlt,line)
if tline == None:
print(" ".join(line))
if not (line[1] in ["ecar","pvehicle"]) and isCarLine:
val = float(line[-1])
tval = float(tline[-1])
line[-1] = str(val + ((tval - val) * topBias[car]))
tval = val
if not isTopLine:
tline = findTopLine(parsedVlt,line)
if tline == None:
print(" ".join(line))
tval = float(tline[-1])
val = val + ((tval - val) * topBias[car])
if car in gripScale:
if line[3] == "GRIP_SCALE":
val = val * gripScale[car]
tval = tval * gripScale[car]
line[-1] = str(val)
index = 0
while index < length: