From fb53ee5e242be7781b0d34a7d006c630095bcb72 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 3 Jan 2012 19:36:30 +0100 Subject: srd: *.py: Remove one incorrect ord() call. While 'data' is of type 'bytes', 'data[0]' for example is of type 'int', thus the ord() there is neither needed nor correct anymore (yields an error). --- decoders/nunchuk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoders/nunchuk.py') diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py index fbc03d4..cc1252c 100644 --- a/decoders/nunchuk.py +++ b/decoders/nunchuk.py @@ -66,7 +66,7 @@ class Sample(): def __init__(self, data): self.data = data def probe(self, probe): - s = ord(self.data[int(probe / 8)]) & (1 << (probe % 8)) + s = self.data[int(probe / 8)] & (1 << (probe % 8)) return True if s else False def sampleiter(data, unitsize): -- cgit v1.2.3-70-g09d2