stanleyhuangyc / ArduinoOBD

OBD-II library and sketches for Arduino
http://freematics.com
968 stars 519 forks source link

Fixed PercentValue function #60

Closed willeccles closed 4 years ago

willeccles commented 5 years ago

I highly doubt this will get merged based on what I've seen in the PR list, but this is a fix that makes the COBD::getPercentageValue function not return 0 every time. Previously, for a majority inputs, this would result in 0, and otherwise result in a very imprecise value. This fix changes that.

willeccles commented 5 years ago

Too lazy to squash commits, so some of those look quite useless. Check out the Files Changed tab for the actual diff (ignore whitespace-only changes, since those were the fault of my editor). There were some changes I realized I didn't need/want in there, so they were removed prior to the PR.