apihlaja / node-irsdk

iRacing SDK implementation for Node.js.
https://apihlaja.github.io/node-irsdk
MIT License
102 stars 55 forks source link

Team and Driver names are not parsed properly #2

Closed apihlaja closed 7 years ago

apihlaja commented 9 years ago

node-irsdk uses YAML parser for session info but session info is not following YAML spec strictly. Thus there is random issues.

Only issue Im aware of at the moment is team names, for example: output and input. Part of team name is missing because # is comment character in Yaml. There may be some other glitches too.

Also, ' in driver and team names are simply replaced by . Thats done by iRacing, thus its impossible match names you see on screen in iRacing.

apihlaja commented 9 years ago

init option sessionInfoParser can be used to inject hacked Yaml parser. Example of custom parser is in print-names.js. I dont want to maintain that so its not included into node-irsdk. But I will keep this issue open as long as TeamName hack is necessary.

Also, custom parser gives option to replace js-yaml. For example, you could plug in David´s parser from Logitech ARX project. Its fast, twice as fast as js-yaml, but it doesnt parse values at all. Which also means TeamName issue doesnt affect it.

apihlaja commented 7 years ago

I think I'll include this into sdk. Just have to check if the hack is still needed.

apihlaja commented 7 years ago

Done https://github.com/apihlaja/node-irsdk/pull/12/commits/0e0b3ab9a01521e1399b4482e0a2c14167983a14 (except I didnt test if it's needed)