eckhchri / pcars-ds-liveview

Provides a html page for project cars dedicated server and display a map of the current race.
14 stars 1 forks source link

Switch back from CREST to DS mode not working #48

Closed viper4gh closed 8 years ago

viper4gh commented 8 years ago

If you switch from DS to CREST, it works. But if you then switch back to DS, it hangs at CREST.

viper4gh commented 8 years ago

The dropdown menu for the mode in the GUI sets the the DS-Mode to "DS " instead of "DS". There is a space after DS. https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L268

In result the if statements APIMODE == "DS" are going to the else statement: https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L418 and https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L448

2 possible solutions:

  1. Don't add a space at https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L268
  2. change the if statements to: APIMODE == "DS" || APIMODE == "DS "
eckhchri commented 8 years ago

Solution 1. is working fine. Change added with commit: https://github.com/eckhchri/pcars-ds-liveview/commit/aa5975b3807cc67013d6ea42384bd1bdc1cc21ce