calimero-project / calimero-core

Core library for KNX network access and management
Other
129 stars 65 forks source link

DPTXlator4ByteFloat getValues() uses different locales based on value (#5) #9

Closed Snickermicker closed 10 years ago

Snickermicker commented 10 years ago

DPTXlator4ByteFloat was using different locales within makeString() method. If the float is less then 100000 then String.valueOf() would be used, which is actually Float.toString(). This is a non-localized method. If the float is larger or equal 100000 then DecimalFormat("0.#####E0").format() would used. DecimalFormat uses the default locale. Otherwise, String.format() was used which is not localized. Since DPTXlator2ByteFloat is also using non-localized output: I changed the output to non-localized (US).