diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-14 21:34:06 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-14 21:34:06 +0100 |
commit | a2d2aff27099449deb1a791b3adc05ee610861e6 (patch) | |
tree | 6ab5ef16228ef87a4290ce681f81d49233ab2447 /decoders/nunchuk.py | |
parent | ea90233eb2e76cca10adf3ed3c016c5b6cb993e1 (diff) | |
download | libsigrokdecode-a2d2aff27099449deb1a791b3adc05ee610861e6.tar.gz libsigrokdecode-a2d2aff27099449deb1a791b3adc05ee610861e6.zip |
srd: I2C: No need for underscores in string cmds.
Diffstat (limited to 'decoders/nunchuk.py')
-rw-r--r-- | decoders/nunchuk.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py index 0a1a24c..4a5b7a0 100644 --- a/decoders/nunchuk.py +++ b/decoders/nunchuk.py @@ -75,14 +75,14 @@ class Decoder(srd.Decoder): if cmd == 'START': # TODO: Handle 'Sr' here, too? self.state = START - elif cmd == 'START_REPEAT': + elif cmd == 'START REPEAT': pass # FIXME - elif cmd == 'ADDRESS_READ': + elif cmd == 'ADDRESS READ': # TODO: Error/Warning, not supported, I think. pass - elif cmd == 'ADDRESS_WRITE': + elif cmd == 'ADDRESS WRITE': # The Wii Nunchuk always has slave address 0x54. # TODO: Handle this stuff more correctly. if databyte == 0x54: @@ -90,7 +90,7 @@ class Decoder(srd.Decoder): else: pass # TODO: What to do here? Ignore? Error? - elif cmd == 'DATA_READ' and self.state == INITIALIZED: + elif cmd == 'DATA READ' and self.state == INITIALIZED: if self.databytecount == 0: self.sx = databyte elif self.databytecount == 1: @@ -124,10 +124,10 @@ class Decoder(srd.Decoder): # TODO: If 6 bytes read -> save and reset # TODO - elif cmd == 'DATA_READ' and self.state != INITIALIZED: + elif cmd == 'DATA READ' and self.state != INITIALIZED: pass - elif cmd == 'DATA_WRITE': + elif cmd == 'DATA WRITE': if self.state == IDLE: self.state = INITIALIZED return |