erjiang / usbscale

Reads weight data from USB scales.
GNU General Public License v3.0
90 stars 22 forks source link

Support for additional scale and fixes according to the docs. #11

Closed sanmai closed 8 years ago

sanmai commented 8 years ago

In the docs we read that a numeric value representing the scaling applied to the data as ten exponent base. In other words exponent value shall be signed.

Dividing by 10 as it was on line 280 would only work for ounces. For example, DYMO M25 when set to work in grams would return them as they are, and dividing by ten would give us invalid value.

I believe this should bring #8 to closing.

erjiang commented 8 years ago

Hi @sanmai, I tested your changes and you are right about the weight calculation. Thanks for fixing this issue! I unfortunately do not have many scales to test with so I didn't notice this error.