luigisaetta / obdii

The repo contains the Python code developed for the Connected Car OSS work
http://lsaetta.blogspot.it/
MIT License
20 stars 4 forks source link

ENGINE_LOAD is reported with too many decimals #1

Closed luigisaetta closed 6 years ago

luigisaetta commented 6 years ago

For sure it is a bug coming from the underlying Python-OBD library.

luigisaetta commented 6 years ago

In Python-OBD all data returned are represented as Pint entities (value and unit). In OBDIISimulator, in version uploaded on 30/12 9:42, In method getENGINELOAD I have tested a simple wayvto reduce to 3 decimals. I need to test on real OBD data... therefore with a Car Run.

luigisaetta commented 6 years ago

Added method format_float, with entry in gateway.ini, to format with a fixed number of decimals, specified in ini file. Need only to test on Car and real OBDII data

luigisaetta commented 6 years ago

OK, tested the fix, it works!