Skip to content

Commit

Permalink
quoted DriverSetupName, vars.txt updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kutu committed Dec 7, 2021
1 parent ca25b66 commit 1d35fb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions irsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
except ImportError:
from yaml import SafeLoader as YamlSafeLoader

VERSION = '1.3.1'
VERSION = '1.3.2'

SIM_STATUS_URL = 'http://127.0.0.1:32034/get_sim_status?object=simStatus'

Expand Down Expand Up @@ -609,7 +609,7 @@ def _parse_yaml(self, key, session_data):
if key == 'DriverInfo':
def name_replace(m):
return m.group(1) + '"%s"' % re.sub(r'(["\\])', r'\\\1', m.group(2))
yaml_src = re.sub(r'((?:UserName|TeamName|AbbrevName|Initials): )(.*)', name_replace, yaml_src)
yaml_src = re.sub(r'((?:DriverSetupName|UserName|TeamName|AbbrevName|Initials): )(.*)', name_replace, yaml_src)
yaml_src = re.sub(r'(\w+: )(,.*)', r'\1"\2"', yaml_src)
result = yaml.load(yaml_src, Loader=CustomYamlSafeLoader)
# check if result is available, and yaml data is not updated while we were parsing it in async mode
Expand Down
2 changes: 2 additions & 0 deletions vars.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ RRwearL RR tire left percent tread remaining, %
RRwearM RR tire middle percent tread remaining, %
RRwearR RR tire right percent tread remaining, %
SessionFlags Session flags, irsdk_Flags
SessionJokerLapsRemain Joker laps remaining to be taken,
SessionLapsRemain Old laps left till session ends use SessionLapsRemainEx,
SessionLapsRemainEx New improved laps left till session ends,
SessionLapsTotal Total number of laps in session,
SessionNum Session number,
SessionOnJokerLap Player is currently completing a joker lap,
SessionState Session state, irsdk_SessionState
SessionTick Current update number,
SessionTime Seconds since session start, s
Expand Down

0 comments on commit 1d35fb8

Please sign in to comment.