Examples of DPTXlator4ByteFloat


Examples of tuwien.auto.calimero.dptxlator.DPTXlator4ByteFloat

         * FIXME: Workaround for a bug in Calimero / Openhab DPTXlator4ByteFloat.makeString(): is using a locale when
         * translating a Float to String. It could happen the a ',' is used as separator, such as 3,14159E20.
         * Openhab's DecimalType expects this to be in US format and expects '.': 3.14159E20.
         * There is no issue with DPTXlator2ByteFloat since calimero is using a non-localized translation there.
         */
        DPTXlator4ByteFloat translator4ByteFloat = (DPTXlator4ByteFloat) translator;
        Float f=translator4ByteFloat.getValueFloat();
        if (Math.abs(f) < 100000) {
          value=String.valueOf(f);
        }
        else {
          NumberFormat dcf = NumberFormat.getInstance(Locale.US);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.