From: Uwe Hermann Date: Thu, 5 Jan 2012 20:07:23 +0000 (+0100) Subject: srd: We use 0/1 instead of False/True at the moment. X-Git-Tag: libsigrokdecode-0.1.0~203 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c66baa8cbe1d5f0b6d6c4fb8cbe8ca05fcdf7763;p=libsigrokdecode.git srd: We use 0/1 instead of False/True at the moment. --- diff --git a/decoders/spi.py b/decoders/spi.py index 17d9628..2c7445f 100644 --- a/decoders/spi.py +++ b/decoders/spi.py @@ -38,7 +38,7 @@ class Decoder(sigrokdecode.Decoder): options = {} def __init__(self): - self.oldsck = True + self.oldsck = 1 self.rxcount = 0 self.rxdata = 0 self.bytesreceived = 0 diff --git a/decoders/srd_usb.py b/decoders/srd_usb.py index 4792eeb..3969532 100644 --- a/decoders/srd_usb.py +++ b/decoders/srd_usb.py @@ -45,10 +45,10 @@ import sigrokdecode # States SE0, J, K, SE1 = 0, 1, 2, 3 syms = { - (False, False): SE0, - (True, False): J, - (False, True): K, - (True, True): SE1, + (0, 0): SE0, + (1, 0): J, + (0, 1): K, + (1, 1): SE1, } def bitstr_to_num(bitstr):