mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
148 stars 89 forks source link

RFlink WINDIR message generate a Java NumberFormatException: Infinite or NaN #508

Open zoomx opened 4 years ago

zoomx commented 4 years ago

I get this error 2020-05-04 18:56:15,612 ERROR [Thread-27] [org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm:201] Exception, RawMessage:[20;25;Alecto V1;ID=0005;WINDIR=0008;WINGS=0005;BAT=OK;\r] java.lang.NumberFormatException: Infinite or NaN at java.math.BigDecimal.(BigDecimal.java:898) at java.math.BigDecimal.(BigDecimal.java:875) at org.mycontroller.standalone.utils.McUtils.getDoubleAsString(McUtils.java:106) at org.mycontroller.standalone.utils.McUtils.getDoubleAsString(McUtils.java:117) at org.mycontroller.standalone.provider.rflink.RFLink.getPayload(RFLink.java:112) at org.mycontroller.standalone.provider.rflink.RFLink.getPayload(RFLink.java:116) at org.mycontroller.standalone.provider.rflink.MessageParserRFLink.get(MessageParserRFLink.java:198) at org.mycontroller.standalone.provider.rflink.MessageParserRFLink.getMessage(MessageParserRFLink.java:130) at org.mycontroller.standalone.provider.rflink.MessageParserRFLink.getMessage(MessageParserRFLink.java:39) at org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm.serialEvent(SerialDriverJSerialComm.java:170) at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener.waitForSerialEvent(SerialPort.java:937) at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener$1.run(SerialPort.java:885) at java.lang.Thread.run(Thread.java:748)

but the message seems OK 20;25;Alecto V1;ID=0005;WINDIR=0008;WINGS=0005;BAT=OK;\r

Last vesrion of MyController on a RaspberryPI using last Oracle Java

MyController

Version 1.5.0 Database schema revision 1.04.06 - 2018 Dec 04 Database type H2 database embedded Database version 1.4.194 (2017-03-10) Git commit:branch b4e9a0cc5e911acb0053e27579eb6c7b9850b76c:master Built on 2019-12-11T11:29:51+0530 Build JDK 1.8.0_232 Build tool Apache Maven 3.5.4

Java virtual machine specification

VM vendor Oracle Corporation VM name Java HotSpot(TM) Client VM VM version 1.8.0_241-b07 Java home /opt/jdk1.8.0_241/jre

Operating system

Operating system Linux Architecture arm Version/Kernel 4.19.97-v7+ Location /opt/mycontroller/