summaryrefslogtreecommitdiff
path: root/HACKING
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-06-09 04:21:18 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-06-09 04:21:18 +0000
commit9653be355028ad8038ed030e1d085940992916f6 (patch)
treed986911722f2a91f862099199bdc19600200109d /HACKING
parent4ab25305f481b8f985239d5b34ce5817c45d1395 (diff)
downloadgpsd-9653be355028ad8038ed030e1d085940992916f6.tar.gz
Add some documentation.
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING10
1 files changed, 9 insertions, 1 deletions
diff --git a/HACKING b/HACKING
index 9f372791..0cc663a3 100644
--- a/HACKING
+++ b/HACKING
@@ -379,7 +379,8 @@ the GPS that you can use as a trigger string for a driver. This is
how we detect SiRF chips (see step 5 under autoconfiguration above).
If you're writing a driver, look in gpsutils.c; driver helper
-functions live there.
+functions live there. The easiest way is probably to copy an
+existing driver and change the guts of the analyzer function.
Your packet parser must return field-validity mask bits (using the
*_SET macros in gps.h), suitable to be put in session->gpsdata.valid.
@@ -397,6 +398,13 @@ structure should be UTC (with leap-second corrections) not just Unix
seconds since the epoch. The report-generator function for D
does *not* apply a timezone offset.
+If you have to add a new packet type to packet.c, add tests for the
+type to the TESTMAIN code. Also, remember to tell gpsfake how to
+gather the new packet type so it can handle logs for regression
+testing. The relevant function in gpsfake is packet_get(). It
+doesn't have to deal with garbage or verify checksums, as we assume
+the logfiles will be clean packet sequences,
+
** Log files for regression testing
Any time you add support for a new GPS type, you should also send us a