THIS does NOT work:
Code:
gps:
LCDOUT $fe,1,"in GPS"
LCDOUT $fe,$c0,"Serin start"
PAUSE 2000
'SerIn2 PORTA.0,188,3000,toto,[Wait("$GPRMC,"),DEC2 b1,DEC2 b2] 'works
SerIn2 PORTA.0,188,3000,toto,[wait("$GPRMC"),wait(","),DEC2 hh,DEC2 mm,wait(","),fix,wait(","),DEC2 latdeg,DEC2 latmin,wait(","),NS,wait(","),DEC3 londeg,DEC2 lonmin,wait(","),EO,wait(","),knots,wait("."),DEC2 knotsten,wait(","),DEC3 course,wait(","),DEC2 j,DEC2 m,DEC2 a] 'works
LCDOUT $fe,1,"found"
LCDOUT $fe,$c0,"="
PAUSE 2000
IF fix="V" Then display
goto gps
toto:
LCDOUT $fe,1,"timeout"
PAUSE 2000
GOTO gps
display:
LCDOUT $fe,1,"Data is:"
PAUSE 2000
goto gps
While THIS works:
Code:
gps:
LCDOUT $fe,1,"in GPS"
LCDOUT $fe,$c0,"Serin start"
PAUSE 2000
'SerIn2 PORTA.0,188,3000,toto,[Wait("$GPRMC,"),DEC2 b1,DEC2 b2] 'works
SerIn2 PORTA.0,188,3000,toto,[wait("$GPRMC"),wait(","),DEC2 hh,DEC2 mm,wait(","),fix,wait(","),DEC2 latdeg,DEC2 latmin,wait(","),NS,wait(","),DEC3 londeg,DEC2 lonmin,wait(","),EO,wait(","),knots,wait("."),DEC2 knotsten,wait(","),DEC3 course,wait(","),DEC2 j,DEC2 m,DEC2 a] 'works
LCDOUT $fe,1,"found"
LCDOUT $fe,$c0,"="
PAUSE 2000
goto gps
toto:
LCDOUT $fe,1,"timeout"
PAUSE 2000
GOTO gps
WHY?
Bookmarks