diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2016-05-04 19:15:06 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2016-05-09 12:02:36 +0200 |
commit | a9f7935a3db8da5aa9b137cf758ad1c57f31cae9 (patch) | |
tree | e5a415f3fa3bad021de3cf1798499fadab310936 | |
parent | ada4c3a342cdfc40bb83a927ece536cc984e27be (diff) | |
download | libsigrokdecode-a9f7935a3db8da5aa9b137cf758ad1c57f31cae9.tar.gz libsigrokdecode-a9f7935a3db8da5aa9b137cf758ad1c57f31cae9.zip |
Consistently use ' instead of " for strings in all PDs.
-rw-r--r-- | common/plugtrx/mod.py | 232 | ||||
-rw-r--r-- | decoders/arm_tpiu/pd.py | 4 | ||||
-rw-r--r-- | decoders/edid/pd.py | 4 | ||||
-rw-r--r-- | decoders/jitter/pd.py | 12 | ||||
-rw-r--r-- | decoders/usb_power_delivery/__init__.py | 6 |
5 files changed, 129 insertions, 129 deletions
diff --git a/common/plugtrx/mod.py b/common/plugtrx/mod.py index f66c271..3d1b66d 100644 --- a/common/plugtrx/mod.py +++ b/common/plugtrx/mod.py @@ -34,159 +34,159 @@ MODULE_ID = { } ALARM_THRESHOLDS = { - 0: "Temp high alarm", - 2: "Temp low alarm", - 4: "Temp high warning", - 6: "Temp low warning", - 16: "Bias high alarm", - 18: "Bias low alarm", - 20: "Bias high warning", - 22: "Bias low warning", - 24: "TX power high alarm", - 26: "TX power low alarm", - 28: "TX power high warning", - 30: "TX power low warning", - 32: "RX power high alarm", - 34: "RX power low alarm", - 36: "RX power high warning", - 38: "RX power low warning", - 40: "AUX 1 high alarm", - 42: "AUX 1 low alarm", - 44: "AUX 1 high warning", - 46: "AUX 1 low warning", - 48: "AUX 2 high alarm", - 50: "AUX 2 low alarm", - 52: "AUX 2 high warning", - 54: "AUX 2 low warning", + 0: 'Temp high alarm', + 2: 'Temp low alarm', + 4: 'Temp high warning', + 6: 'Temp low warning', + 16: 'Bias high alarm', + 18: 'Bias low alarm', + 20: 'Bias high warning', + 22: 'Bias low warning', + 24: 'TX power high alarm', + 26: 'TX power low alarm', + 28: 'TX power high warning', + 30: 'TX power low warning', + 32: 'RX power high alarm', + 34: 'RX power low alarm', + 36: 'RX power high warning', + 38: 'RX power low warning', + 40: 'AUX 1 high alarm', + 42: 'AUX 1 low alarm', + 44: 'AUX 1 high warning', + 46: 'AUX 1 low warning', + 48: 'AUX 2 high alarm', + 50: 'AUX 2 low alarm', + 52: 'AUX 2 high warning', + 54: 'AUX 2 low warning', } AD_READOUTS = { - 0: "Module temperature", - 4: "TX bias current", - 6: "Measured TX output power", - 8: "Measured RX input power", - 10: "AUX 1 measurement", - 12: "AUX 2 measurement", + 0: 'Module temperature', + 4: 'TX bias current', + 6: 'Measured TX output power', + 8: 'Measured RX input power', + 10: 'AUX 1 measurement', + 12: 'AUX 2 measurement', } GCS_BITS = [ - "TX disable", - "Soft TX disable", - "MOD_NR", - "P_Down", - "Soft P_Down", - "Interrupt", - "RX_LOS", - "Data_Not_Ready", - "TX_NR", - "TX_Fault", - "TX_CDR not locked", - "RX_NR", - "RX_CDR not locked", + 'TX disable', + 'Soft TX disable', + 'MOD_NR', + 'P_Down', + 'Soft P_Down', + 'Interrupt', + 'RX_LOS', + 'Data_Not_Ready', + 'TX_NR', + 'TX_Fault', + 'TX_CDR not locked', + 'RX_NR', + 'RX_CDR not locked', ] CONNECTOR = { - 0x01: "SC", - 0x02: "Fibre Channel style 1 copper", - 0x03: "Fibre Channel style 2 copper", - 0x04: "BNC/TNC", - 0x05: "Fibre Channel coax", - 0x06: "FiberJack", - 0x07: "LC", - 0x08: "MT-RJ", - 0x09: "MU", - 0x0a: "SG", - 0x0b: "Optical pigtail", - 0x20: "HSSDC II", - 0x21: "Copper pigtail", + 0x01: 'SC', + 0x02: 'Fibre Channel style 1 copper', + 0x03: 'Fibre Channel style 2 copper', + 0x04: 'BNC/TNC', + 0x05: 'Fibre Channel coax', + 0x06: 'FiberJack', + 0x07: 'LC', + 0x08: 'MT-RJ', + 0x09: 'MU', + 0x0a: 'SG', + 0x0b: 'Optical pigtail', + 0x20: 'HSSDC II', + 0x21: 'Copper pigtail', } TRANSCEIVER = [ # 10GB Ethernet - ["10GBASE-SR", "10GBASE-LR", "10GBASE-ER", "10GBASE-LRM", "10GBASE-SW", - "10GBASE-LW", "10GBASE-EW"], + ['10GBASE-SR', '10GBASE-LR', '10GBASE-ER', '10GBASE-LRM', '10GBASE-SW', + '10GBASE-LW', '10GBASE-EW'], # 10GB Fibre Channel - ["1200-MX-SN-I", "1200-SM-LL-L", "Extended Reach 1550 nm", - "Intermediate reach 1300 nm FP"], + ['1200-MX-SN-I', '1200-SM-LL-L', 'Extended Reach 1550 nm', + 'Intermediate reach 1300 nm FP'], # 10GB Copper [], # 10GB low speed - ["1000BASE-SX / 1xFC MMF", "1000BASE-LX / 1xFC SMF", "2xFC MMF", - "2xFC SMF", "OC48-SR", "OC48-IR", "OC48-LR"], + ['1000BASE-SX / 1xFC MMF', '1000BASE-LX / 1xFC SMF', '2xFC MMF', + '2xFC SMF', 'OC48-SR', 'OC48-IR', 'OC48-LR'], # 10GB SONET/SDH interconnect - ["I-64.1r", "I-64.1", "I-64.2r", "I-64.2", "I-64.3", "I-64.5"], + ['I-64.1r', 'I-64.1', 'I-64.2r', 'I-64.2', 'I-64.3', 'I-64.5'], # 10GB SONET/SDH short haul - ["S-64.1", "S-64.2a", "S-64.2b", "S-64.3a", "S-64.3b", "S-64.5a", "S-64.5b"], + ['S-64.1', 'S-64.2a', 'S-64.2b', 'S-64.3a', 'S-64.3b', 'S-64.5a', 'S-64.5b'], # 10GB SONET/SDH long haul - ["L-64.1", "L-64.2a", "L-64.2b", "L-64.2c", "L-64.3", "G.959.1 P1L1-2D2"], + ['L-64.1', 'L-64.2a', 'L-64.2b', 'L-64.2c', 'L-64.3', 'G.959.1 P1L1-2D2'], # 10GB SONET/SDH very long haul - ["V-64.2a", "V-64.2b", "V-64.3"], + ['V-64.2a', 'V-64.2b', 'V-64.3'], ] SERIAL_ENCODING = [ - "64B/66B", - "8B/10B", - "SONET scrambled", - "NRZ", - "RZ", + '64B/66B', + '8B/10B', + 'SONET scrambled', + 'NRZ', + 'RZ', ] XMIT_TECH = [ - "850 nm VCSEL", - "1310 nm VCSEL", - "1550 nm VCSEL", - "1310 nm FP", - "1310 nm DFB", - "1550 nm DFB", - "1310 nm EML" - "1550 nm EML" - "copper", + '850 nm VCSEL', + '1310 nm VCSEL', + '1550 nm VCSEL', + '1310 nm FP', + '1310 nm DFB', + '1550 nm DFB', + '1310 nm EML' + '1550 nm EML' + 'copper', ] CDR = [ - "9.95Gb/s", - "10.3Gb/s", - "10.5Gb/s", - "10.7Gb/s", - "11.1Gb/s", - "(unknown)", - "lineside loopback mode", - "XFI loopback mode", + '9.95Gb/s', + '10.3Gb/s', + '10.5Gb/s', + '10.7Gb/s', + '11.1Gb/s', + '(unknown)', + 'lineside loopback mode', + 'XFI loopback mode', ] DEVICE_TECH = [ - ["no wavelength control", "sctive wavelength control"], - ["uncooled transmitter device", "cooled transmitter"], - ["PIN detector", "APD detector"], - ["transmitter not tunable", "transmitter tunable"], + ['no wavelength control', 'sctive wavelength control'], + ['uncooled transmitter device', 'cooled transmitter'], + ['PIN detector', 'APD detector'], + ['transmitter not tunable', 'transmitter tunable'], ] ENHANCED_OPTS = [ - "VPS", - "soft TX_DISABLE", - "soft P_Down", - "VPS LV regulator mode", - "VPS bypassed regulator mode", - "active FEC control", - "wavelength tunability", - "CMU", + 'VPS', + 'soft TX_DISABLE', + 'soft P_Down', + 'VPS LV regulator mode', + 'VPS bypassed regulator mode', + 'active FEC control', + 'wavelength tunability', + 'CMU', ] AUX_TYPES = [ - "not implemented", - "APD bias voltage", - "(unknown)", - "TEC current", - "laser temperature", - "laser wavelength", - "5V supply voltage", - "3.3V supply voltage", - "1.8V supply voltage", - "-5.2V supply voltage", - "5V supply current", - "(unknown)", - "(unknown)", - "3.3V supply current", - "1.8V supply current", - "-5.2V supply current", + 'not implemented', + 'APD bias voltage', + '(unknown)', + 'TEC current', + 'laser temperature', + 'laser wavelength', + '5V supply voltage', + '3.3V supply voltage', + '1.8V supply voltage', + '-5.2V supply voltage', + '5V supply current', + '(unknown)', + '(unknown)', + '3.3V supply current', + '1.8V supply current', + '-5.2V supply current', ] diff --git a/decoders/arm_tpiu/pd.py b/decoders/arm_tpiu/pd.py index ba01aa0..02b7ad2 100644 --- a/decoders/arm_tpiu/pd.py +++ b/decoders/arm_tpiu/pd.py @@ -58,13 +58,13 @@ class Decoder(srd.Decoder): if self.stream != stream: if self.stream != 0: self.put(self.stream_ss, ss, self.out_ann, - [0, ["Stream %d" % self.stream, "S%d" % self.stream]]) + [0, ['Stream %d' % self.stream, 'S%d' % self.stream]]) self.stream = stream self.stream_ss = ss def emit_byte(self, ss, es, byte): if self.stream == self.options['stream']: - self.put(ss, es, self.out_ann, [1, ["0x%02x" % byte]]) + self.put(ss, es, self.out_ann, [1, ['0x%02x' % byte]]) self.put(ss, es, self.out_python, ['DATA', 0, (byte, [])]) def process_frame(self, buf): diff --git a/decoders/edid/pd.py b/decoders/edid/pd.py index b154de7..ae2f839 100644 --- a/decoders/edid/pd.py +++ b/decoders/edid/pd.py @@ -140,10 +140,10 @@ class Decoder(srd.Decoder): [ANN_SECTIONS, ['EDID Version']]) self.put(self.sn[OFF_VERSION][0], self.sn[OFF_VERSION][1], self.out_ann, [ANN_FIELDS, - ["Version %d" % self.cache[-2]]]) + ['Version %d' % self.cache[-2]]]) self.put(self.sn[OFF_VERSION+1][0], self.sn[OFF_VERSION+1][1], self.out_ann, [ANN_FIELDS, - [ "Revision %d" % self.cache[-1]]]) + ['Revision %d' % self.cache[-1]]]) elif self.cnt == OFF_CHROM: self.put(self.sn[OFF_BASIC][0], es, self.out_ann, [ANN_SECTIONS, ['Basic display']]) diff --git a/decoders/jitter/pd.py b/decoders/jitter/pd.py index ba1bffa..6dbc27a 100644 --- a/decoders/jitter/pd.py +++ b/decoders/jitter/pd.py @@ -91,17 +91,17 @@ class Decoder(srd.Decoder): def putx(self, delta): # Adjust granularity. if delta == 0 or delta >= 1: - delta_s = "%.1fs" % (delta) + delta_s = '%.1fs' % (delta) elif delta <= 1e-12: - delta_s = "%.1ffs" % (delta * 1e15) + delta_s = '%.1ffs' % (delta * 1e15) elif delta <= 1e-9: - delta_s = "%.1fps" % (delta * 1e12) + delta_s = '%.1fps' % (delta * 1e12) elif delta <= 1e-6: - delta_s = "%.1fns" % (delta * 1e9) + delta_s = '%.1fns' % (delta * 1e9) elif delta <= 1e-3: - delta_s = "%.1fμs" % (delta * 1e6) + delta_s = '%.1fμs' % (delta * 1e6) else: - delta_s = "%.1fms" % (delta * 1e3) + delta_s = '%.1fms' % (delta * 1e3) self.put(self.clk_start, self.sig_start, self.out_ann, [0, [delta_s]]) diff --git a/decoders/usb_power_delivery/__init__.py b/decoders/usb_power_delivery/__init__.py index 669fb48..4ba626a 100644 --- a/decoders/usb_power_delivery/__init__.py +++ b/decoders/usb_power_delivery/__init__.py @@ -18,8 +18,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -""" -USB Power Delivery - baseband protocol decoder / checker -""" +''' +USB Power Delivery - baseband protocol decoder / checker. +''' from .pd import * |