First of all, I'm using Lejos v0.9.1 (fw version rev: 6217) from snapshot folder in the svn in my NXT's.
Using the sample file BTGPS.java, i've observed that when the gps data are printed in the NXT display, several numbers are displayed in the LCD all the time.
I think that all of this is because in VTGSentence.java file, line 106 shouldn't be there (or at least,should be commented)
- Code: Select all
......
if(part8.length() == 0){
speed = 0;
}else{
speed = Float.parseFloat(part8);
}
System.out.println(speed); /*line 106*/
.......
Also, in spite of the bug, this program (BTGPS.java) raises an exception too (when running during a few minutes)
Exception: 79
string doesn't c
at: 131:25
....
at: 54:281
The line code (with nxjdebugtool) that raises the exception:
- Code: Select all
C:\Documents and Settings\Administrador\Mis documentos\LeJOSNXJProjects\BTGPS_2\
src>nxjdebugtool -di BTGPS_2.nxd -c -m 79 131 25
The class number 79 refers to:
java.lang.NumberFormatException (NumberFormatException.java)
The method number 131 refers to:
java.lang.Integer.parseInt(Ljava/lang/String;IIZI)I (Integer.java)
PC 25 refers to:
line 291 in Integer.java
C:\Documents and Settings\Administrador\Mis documentos\LeJOSNXJProjects\BTGPS_2\
src>nxjdebugtool -di BTGPS_2.nxd -c -m 79 54 281
The class number 79 refers to:
java.lang.NumberFormatException (NumberFormatException.java)
The method number 54 refers to:
BTGPS_2.showData()V (BTGPS_2.java)
PC 281 refers to:
line 240 in BTGPS_2.java
Line 240 in BTGPS.java:
- Code: Select all
now = gps.getDate();
Thanks
