GPS4Palm

Source Code Documentation


GPS.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MSGHANDLER_SECTION   __attribute__ ((section ("msghand")))

Functions

UInt32 PilotMain (UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
 Application Entry Function.
Boolean ReadFromGPS (void) MSGHANDLER_SECTION
 Reads data from GPS receiver.

Variables

UInt16 gTicksPerSecond
 Ticks per second (OS/Hardware specific).
UInt32 gMaxTicksWithoutTime
 if we go this long without updating the time then update as soon as we get a valid time (without waiting for an even 5-second time)
UInt32 gTicksToLoseGPS
 if we go this long without communicating with GPS, we've lost it and need to notify the user
Boolean gFormOpened
 Global flag.


Define Documentation

#define MSGHANDLER_SECTION   __attribute__ ((section ("msghand")))
 

Definition at line 36 of file GPS.h.


Function Documentation

UInt32 PilotMain UInt16  cmd,
MemPtr  cmdPBP,
UInt16  launchFlags
 

Application Entry Function.

Parameters:
cmd Launch Code
cmdPBP Command Parameter Block Pointer
launchFlags Launch Flags (set by OS)
Returns:
always 0

Definition at line 1135 of file GPS.c.

References kMinimumVersion, and RomVersionCompatible().

Boolean ReadFromGPS void   ) 
 

Reads data from GPS receiver.

If no messages are received for a certain time, a warning is generated. A large block of data is read from the serial buffer in one go. Then the data is parsed. Only complete messages (starting with $GP and ending with checksum) and valid checksum are passed to the message handler function.

Returns:
Flag which shows if message has been handled successfully. (TBD: all msgs, first msg, ???)

Definition at line 855 of file GPS.c.

References exp(), HandleMessage(), and nibble2hex().

Referenced by ApproachFormHandleEvent(), DebugFormHandleEvent(), MainFormHandleEvent(), MapFormHandleEvent(), NavigationFormHandleEvent(), SkyviewFormHandleEvent(), and WayptEditFormHandleEvent().


Variable Documentation

Boolean gFormOpened
 

Global flag.

Definition at line 260 of file GPS.c.

UInt32 gMaxTicksWithoutTime
 

if we go this long without updating the time then update as soon as we get a valid time (without waiting for an even 5-second time)

Definition at line 301 of file GPS.c.

Referenced by HandleMessage().

UInt16 gTicksPerSecond
 

Ticks per second (OS/Hardware specific).

Definition at line 294 of file GPS.c.

Referenced by HandleMessage().

UInt32 gTicksToLoseGPS
 

if we go this long without communicating with GPS, we've lost it and need to notify the user

Definition at line 307 of file GPS.c.


Created: Mon, 08 Oct 2007 22:33:16 +0200
Copyright ©2004 M. Prinke