[chirp_devel] [PATCH] Show clone/live radio type in model support matrix. #1279
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1386007172 28800 # Node ID 14773355dc953e6de1dd3e8d29b6cfa1d92d5722 # Parent 8125d5fddbe70cc6a79f414b883bbf767173648f Show clone/live radio type in model support matrix. #1279
diff -r 8125d5fddbe7 -r 14773355dc95 share/make_supported.py --- a/share/make_supported.py Wed Nov 20 19:36:59 2013 -0600 +++ b/share/make_supported.py Mon Dec 02 09:59:32 2013 -0800 @@ -15,6 +15,20 @@ KEYS = [x for x in sorted(RF.__dict__.keys()) \ if "_" in x and not x.startswith("_")]
+RADIO_TYPES = { + 'Clone': chirp_common.CloneModeRadio, + 'File': chirp_common.FileBackedRadio, + 'Live': chirp_common.LiveRadio, +} + + +def radio_type(radio): + for k, v in RADIO_TYPES.items(): + if isinstance(radio, v): + return k + return "" + + def supported_row(radio, odd): row = '<tr class="%s" title="%s %s %s">' % (odd and "odd" or "even", radio.VENDOR, @@ -57,6 +71,7 @@ value and "Yes" or "No") else: row += '<td class="%s">%s</td>' % (key, value) + row += '<td class="radio_type">%s</td>' % radio_type(radio) row += "</tr>\n" return row
@@ -66,6 +81,7 @@ for key in KEYS: Key = key.split("_", 1)[1].title().replace("_", " ") row += '<th title="%s">%s</th>' % (RF.get_doc(key), Key) + row += '<th title="Radio programming type">Type</th>\n' row += "</tr></thead>\n" return row
participants (1)
-
Tom Hayward