From 3ca8431037b758360f4f416dc726145c083a8c65 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 17 Jan 2013 23:05:59 -0500 Subject: Move NTP information into the main hardware table. --- gpscap.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gpscap.py') 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): Interface Tested with NMEA version +PPS Notes """ @@ -137,6 +138,18 @@ class GPSDictionary(ConfigParser.RawConfigParser): if self.has_option(dev, "nmea"): nmea = self.get(dev, "nmea") ofp.write("%s\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("%s
%s\n" % (pps_accuracy, ntp_offset)) + else: + ofp.write("?
\n") + else: + ofp.write(" \n") if self.has_option(dev, "notes"): notes = self.get(dev, "notes") else: -- cgit v1.2.1