diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-02-01 23:14:29 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-02-01 23:18:25 +0100 |
commit | 7f7ea759ebdc854beb0468b410f7d2382f291a4f (patch) | |
tree | 079e608f706706609d7fb95b81c485cc548a8396 /decoders/mlx90614 | |
parent | 156509ca42f0df2380c9f205f9aad337e1a07802 (diff) | |
download | libsigrokdecode-7f7ea759ebdc854beb0468b410f7d2382f291a4f.tar.gz libsigrokdecode-7f7ea759ebdc854beb0468b410f7d2382f291a4f.zip |
srd: Properly use append() for appending to lists.
This is not only the canonical way to do it, it's also quite a bit faster
and less memory-intensive than using '+='.
Diffstat (limited to 'decoders/mlx90614')
-rw-r--r-- | decoders/mlx90614/mlx90614.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoders/mlx90614/mlx90614.py b/decoders/mlx90614/mlx90614.py index f50e568..4fa8a0d 100644 --- a/decoders/mlx90614/mlx90614.py +++ b/decoders/mlx90614/mlx90614.py @@ -69,10 +69,10 @@ class Decoder(srd.Decoder): self.state = 'GET TEMPERATURE' elif self.state == 'GET TEMPERATURE': if len(self.data) == 0: - self.data += [databyte] + self.data.append(databyte) self.ss = ss elif len(self.data) == 1: - self.data += [databyte] + self.data.append(databyte) self.es = es else: kelvin = (self.data[0] | (self.data[1] << 8)) * 0.02 |