EricSmekens / node-bluetooth-obd

Node package for communication with Bluetooth OBD connectors.
Other
267 stars 71 forks source link

added 7 new PID entries(62, 67, 6B, 6D, 6E, 73, 78), added 2 function… #15

Closed YimengZhu closed 8 years ago

YimengZhu commented 8 years ago

… to cenvert the raw data to useful(convertEngineTorque, convertExhastGasTemperature).

YimengZhu commented 8 years ago

Another question. May be naive... Why I got the different version of this node module if i use npm install bluetooth-obd. The code i got from npm is different from the code you publish in github.

I'm new to web development. Hope this question didn't trouble.

EricSmekens commented 8 years ago

Answer to your question: NPM are released versions which I tested. On github the development happens. If there is need to publish the module, then I will publish it to npm.

EricSmekens commented 8 years ago

Thanks! Looks good. Will merge it.

I have some plans to merge my two obd-modules, or atleast refactor the library, so I will wait with publishing for now. If you would like a version on NPM anyway, just let me know and I will make some preparations.

YimengZhu commented 8 years ago

Thanks, it would be perfect, if the NPM is up to date. I also found somewhere else in the obd.js file which can be improved. For example, a command should sent after timeout or getting the response from obd. That's exactly the problem I faced with my car, that the command was sent too fast to wait for a response. But I didn't fix it totally. Will continue on it.

EricSmekens commented 8 years ago

True, I would like to refactor the whole library so that uses a simple callback mechanism.

EricSmekens commented 8 years ago

@YimengZhu Published it to NPM, 0.2.3.

I am thinking of refactoring a little bit. But I need a nice simulator running again. Currently have something on my raspberry, but it's not very reliable sadly enough. Going to try something with a Virtual machine in the coming days.

YimengZhu commented 8 years ago

Thanks a lot for the publishing. If there is something I can help with the refactoring, I will be glad to do something.

Actually I used another Mechanisms to write the command of Hexstring to OBD. I called the write function inside the callback of event of dataRecieve, so that it can make sure, a new writing will be called after the data of the previous writing is received.

Sorry I don't know if I express myself clear enough. If you have further question, I'll be happy to answer.

EricSmekens commented 8 years ago

Late comment, but just got my OBDsim working again! :)

I will think about the mechanism, needs to change for sure!