From 67dc3f7fa26d7d1c664eca372d53f89ea7394d8d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 31 Aug 2009 21:06:18 +0000 Subject: Add a hotplug icon to the capability chart. --- gpscap.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gpscap.py') diff --git a/gpscap.py b/gpscap.py index c0e6c232..386d6094 100644 --- a/gpscap.py +++ b/gpscap.py @@ -1,6 +1,6 @@ """ -gpscap - GPS capability dictionary class. +gpscap - GPS/AIS capability dictionary class. """ import ConfigParser @@ -67,6 +67,7 @@ class GPSDictionary(ConfigParser.RawConfigParser): """ vhead = "%s\n" + hotpluggables = ("pl2303", "CP2101") ofp.write(thead % (len(self.devices), len(self.vendors))) for vendor in self.vendors: ofp.write(vhead % (self.get(vendor, "vendor_site"), vendor)) @@ -114,15 +115,17 @@ class GPSDictionary(ConfigParser.RawConfigParser): if self.has_option(dev, "noconfigure"): testfield += "" if self.get(dev, "status") == "excellent": - testfield += "" + testfield += "" elif self.get(dev, "status") == "good": - testfield += "" + testfield += "" elif self.get(dev, "status") == "fair": - testfield += "" + testfield += "" elif self.get(dev, "status") == "poor": - testfield += "" + testfield += "" elif self.get(dev, "status") == "broken": - testfield += "" + testfield += "" + if self.has_option(dev, "usbchip") and self.get(dev, "usbchip") in hotpluggables: + testfield += "" ofp.write("%s\n" % testfield) nmea = " " if self.has_option(dev, "nmea"): -- cgit v1.2.1