rhysmorgan134 / react-carplay

MIT License
381 stars 58 forks source link

Canbus not working and PiMost enabled regardless of the boolean flag #71

Open CDX-24 opened 1 week ago

CDX-24 commented 1 week ago

Hi,

First of all, awesome project ! I am planning on using your project in my car and I'm currently setting up the canbus module. I believe I have spotted an issue in the index.ts in the initialisation of PiMost. It uses the "most" config variable to determine whether the PiMost should be activated (In my case it shouldn't) instead of the "piMost".

if(config!.most) {
      console.log('creating pi most in main')
      piMost = new PiMost(socket)
}

In my case, this generates an error (Javascript ENOENT no such file or directory) and the canbus feature won't start. Changing most:{} to most:false in the config file fixed it and canbus starts succesfully. Which led me to my conclusion that the error may lie in the above code.

Please tell me if I'm doing something wrong ! thanks ! :)