X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fnunchuk.py;h=57be1d77068c8539b6e0d24b061386bcbe2af3d9;hb=74911b4c1f6d184dac878d94992d480af0564734;hp=409e120c458296082d0775bcb97753c72b49f875;hpb=9c93add5aeca95c568afab7fe249c0586d8dec6b;p=libsigrokdecode.git diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py index 409e120..57be1d7 100644 --- a/decoders/nunchuk.py +++ b/decoders/nunchuk.py @@ -47,7 +47,12 @@ example_packets = [ {'type': 'P', 'range': (32, 33), 'data': None, 'ann': ''}, ] -def decode(inbuf): +def decode(l): + print(l) + sigrok.put(l) + + +def decode2(inbuf): """Nintendo Wii Nunchuk decoder""" # FIXME: Get the data in the correct format in the first place. @@ -139,14 +144,26 @@ def decode(inbuf): # FIXME return '' -def register(): - return { - 'id': 'nunchuk', - 'name': 'Nunchuk', - 'desc': 'Nintendo Wii Nunchuk decoder', - 'inputformats': ['i2c'], - 'ouputformats': ['nunchuk'], - } +register = { + 'id': 'nunchuk', + 'name': 'Nunchuk', + 'longname': 'Nintendo Wii Nunchuk decoder', + 'desc': 'Decodes the Nintendo Wii Nunchuk I2C-based protocol.', + 'longdesc': '...', + 'author': 'Uwe Hermann', + 'email': 'uwe@hermann-uwe.de', + 'license': 'gplv2+', + 'in': ['i2c'], + 'out': ['nunchuck'], + 'probes': [ + # TODO + ], + 'options': { + # TODO + }, + # 'start': start, + # 'report': report, +} # Use psyco (if available) as it results in huge performance improvements. try: