From a5ffa0969f6935eba20ee7e5b609dc52b9490eaa Mon Sep 17 00:00:00 2001 From: Tom Hayward Date: Mon, 2 Dec 2013 09:59:32 -0800 Subject: [PATCH] Show clone/live radio type in model support matrix. #1279 --- share/make_supported.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/share/make_supported.py b/share/make_supported.py index 0ed45dfe..c0d135a3 100755 --- a/share/make_supported.py +++ b/share/make_supported.py @@ -15,6 +15,20 @@ RF = chirp_common.RadioFeatures() 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 = '' % (odd and "odd" or "even", radio.VENDOR, @@ -57,6 +71,7 @@ def supported_row(radio, odd): value and "Yes" or "No") else: row += '%s' % (key, value) + row += '%s' % radio_type(radio) row += "\n" return row @@ -66,6 +81,7 @@ def header_row(): for key in KEYS: Key = key.split("_", 1)[1].title().replace("_", " ") row += '%s' % (RF.get_doc(key), Key) + row += 'Type\n' row += "\n" return row