rscada / libmbus

Meter-bus library and utility programs
http://www.rscada.se/libmbus
BSD 3-Clause "New" or "Revised" License
217 stars 137 forks source link

10^9 is Giga not Terra #147

Closed lvogt closed 5 years ago

lvogt commented 5 years ago

https://github.com/rscada/libmbus/blob/2dc3daaf7080cb77640e6caee3154585b8196a37/mbus/mbus-protocol.c#L1826

10^9 is Giga.

On a side note: I think outputting the data with this mix of metric prefixes and "number multipliers" is not really a good idea...

Apollon77 commented 5 years ago

@lvogt is this an issue in ioBroker? Then I can fix it in my fork for node-mbus and also deliver as PR for here .. ?!

lvogt commented 5 years ago

My parsing code knows of this bug and treats T as 10^9... However, I think this is more of a theoretical problem as I don't think there are many meters which output values in this range...

Apollon77 commented 5 years ago

Ok, then I wait for an official merge or repsonse and we update later

lategoodbye commented 5 years ago

Sorry, i'm busy with BCM2835 stuff. But any PR is welcome.