diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-01-17 23:05:59 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-01-17 23:05:59 -0500 |
commit | 3ca8431037b758360f4f416dc726145c083a8c65 (patch) | |
tree | 0b15fe4315cedd179476bc583dcc306947575302 /gpscap.py | |
parent | cb4e72583d46bb606703b06d08c768904376d7bd (diff) | |
download | gpsd-3ca8431037b758360f4f416dc726145c083a8c65.tar.gz |
Move NTP information into the main hardware table.
Diffstat (limited to 'gpscap.py')
-rw-r--r-- | gpscap.py | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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> </td>\n") if self.has_option(dev, "notes"): notes = self.get(dev, "notes") else: |