diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-07 18:42:53 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-07 18:42:53 +0100 |
commit | a565c12819a428b92ea4808114698c5997105e3e (patch) | |
tree | 3186a78d843458767f880365ca9bcdae45bc85d8 /decoders | |
parent | 47bd8ddead2ae35b209839255740e3f81ce4b8bc (diff) | |
download | libsigrokdecode-a565c12819a428b92ea4808114698c5997105e3e.tar.gz libsigrokdecode-a565c12819a428b92ea4808114698c5997105e3e.zip |
srd: UART: Drop 'quick_hack' stuff.
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/uart.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/decoders/uart.py b/decoders/uart.py index dac7017..42c2337 100644 --- a/decoders/uart.py +++ b/decoders/uart.py @@ -124,9 +124,6 @@ MSB_FIRST = 1 DATA_FORMAT_ASCII = 0 DATA_FORMAT_HEX = 1 -# TODO: Remove me later. -quick_hack = 1 - # Given a parity type to check (odd, even, zero, one), the value of the # parity bit, the value of the data, and the length of the data (5-9 bits, # usually 8 bits) return True if the parity is correct, False otherwise. @@ -271,9 +268,6 @@ class Decoder(sigrokdecode.Decoder): self.staterx = GET_DATA_BITS - if quick_hack: # TODO - return [] - o = [{'type': 'S', 'range': (self.frame_start, self.samplenum), 'data': None, 'ann': 'Start bit'}] return o @@ -312,9 +306,6 @@ class Decoder(sigrokdecode.Decoder): self.staterx = GET_PARITY_BIT - if quick_hack: # TODO - return [d] - o = [{'type': 'D', 'range': (self.startsample, self.samplenum - 1), 'data': d, 'ann': None}] @@ -336,15 +327,10 @@ class Decoder(sigrokdecode.Decoder): if parity_ok(self.parity, self.paritybit, self.databyte, self.num_data_bits): - if quick_hack: # TODO - # return ['P'] - return [] # TODO: Fix range. o = [{'type': 'P', 'range': (self.samplenum, self.samplenum), 'data': self.paritybit, 'ann': 'Parity bit'}] else: - if quick_hack: # TODO - return ['PE'] o = [{'type': 'PE', 'range': (self.samplenum, self.samplenum), 'data': self.paritybit, 'ann': 'Parity error'}] @@ -365,9 +351,6 @@ class Decoder(sigrokdecode.Decoder): self.staterx = WAIT_FOR_START_BIT - if quick_hack: # TODO - return [] - # TODO: Fix range. o = [{'type': 'P', 'range': (self.samplenum, self.samplenum), 'data': None, 'ann': 'Stop bit'}] |