EricSmekens / node-serial-obd

Node package for communication with serial OBD connectors.
Other
64 stars 23 forks source link

MAF calculation error #16

Open Chaosflo opened 6 years ago

Chaosflo commented 6 years ago

I found i small math error in the formula!

On Line 103 in obdinfo.js return (parseInt(byteA, 16) 256.0) + (parseInt(byteB, 16) / 100); A256+(B/100)

This formular is slightly wrong

This is the fix! return ((parseInt(byteA, 16) 256.0) + parseInt(byteB, 16)) / 100; ((A256)+B)/100

Thanks for fixing! =)

EricSmekens commented 6 years ago

Would you mind to make a pull request? If you don't have the time, I will fix it myself later.

brandonros commented 4 years ago

any update? :)