stanleyhuangyc / Freematics

Official source code repository for Freematics
https://freematics.com
428 stars 347 forks source link

Please add a timeout parameter to COBDSPI::init(...) #34

Open timurrrr opened 7 years ago

timurrrr commented 7 years ago

Currently, if you call COBDSPI::init(...) while the Freematics ONE is not connected to an OBD port, it will block execution indefinitely. In some cases (e.g. debugging), this may not be desired. It would be nice to have a timeout option so the code can continue without an OBD host connected. A timeout should probably be considered an error (including setting obd.errors to a non-zero value).