#63 gps.mvc.MtkModel.analyseMtkNmea() failes on non-integer

Development version
open
5
2012-09-12
2012-09-12
No

gps.mvc.MtkModel.analyseMtkNmea() does expect PMTK-Messages to continue integer on line 600, but there is PMTKCHN (and PMTKALM, PMTKEPH, PMTKDGP, PMTKDBG), so if the following is received:

$PMTKCHN,03372,08252,18182,16232,22292,19352,26202,06352,30342,15192,44001,07001,00000,21031,11172,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000*40

an exception is thrown:

Exception in Controller run
java.lang.NumberFormatException: For input string: "CHN"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.valueOf(Unknown Source)
at net.sf.bt747.j2se.system.J2SEJavaTranslations.toInt(Unknown Source)
at bt747.sys.JavaLibBridge.toInt(Unknown Source)
at gps.mvc.MtkModel.analyseMtkNmea(Unknown Source)
at gps.mvc.MtkModel.analyseResponse(Unknown Source)
at gps.mvc.GpsModel.analyseResponse(Unknown Source)
at gps.mvc.GpsController.run(Unknown Source)
at net.sf.bt747.j2se.system.J2SEThread.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Discussion


Log in to post a comment.