summaryrefslogtreecommitdiff
path: root/gpscap.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-01-17 23:05:59 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-01-17 23:05:59 -0500
commit3ca8431037b758360f4f416dc726145c083a8c65 (patch)
tree0b15fe4315cedd179476bc583dcc306947575302 /gpscap.py
parentcb4e72583d46bb606703b06d08c768904376d7bd (diff)
downloadgpsd-3ca8431037b758360f4f416dc726145c083a8c65.tar.gz
Move NTP information into the main hardware table.
Diffstat (limited to 'gpscap.py')
-rw-r--r--gpscap.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/gpscap.py b/gpscap.py
index 9bf5eeb9..6ba711f6 100644
--- a/gpscap.py
+++ b/gpscap.py
@@ -65,6 +65,7 @@ class GPSDictionary(ConfigParser.RawConfigParser):
<th>Interface</th>
<th>Tested with</th>
<th>NMEA version</th>
+<th>PPS</th>
<th style='width:50%%'>Notes</th>
</tr>
"""
@@ -137,6 +138,18 @@ class GPSDictionary(ConfigParser.RawConfigParser):
if self.has_option(dev, "nmea"):
nmea = self.get(dev, "nmea")
ofp.write("<td>%s</td>\n" % nmea)
+ if self.has_option(dev, "pps") and self.get(dev, "pps") == "True":
+ pps_accuracy = ntp_offset = ""
+ if self.has_option(dev, "pps_accuracy"):
+ pps_accuracy = self.get(dev, "pps_accuracy")
+ if self.has_option(dev, "ntp_offset"):
+ ntp_offset = self.get(dev, "ntp_offset")
+ if pps_accuracy and ntp_offset:
+ ofp.write("<td>%s<br/>%s</td>\n" % (pps_accuracy, ntp_offset))
+ else:
+ ofp.write("<td>?<br/>\n")
+ else:
+ ofp.write("<td>&nbsp;</td>\n")
if self.has_option(dev, "notes"):
notes = self.get(dev, "notes")
else: