diff options
| author | Damien George <damien.p.george@gmail.com> | 2017-02-21 17:40:34 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2017-02-21 17:40:34 +1100 |
| commit | b0a6dda115e34436cc1774661a57348aee9dbb81 (patch) | |
| tree | 1bda84aadd9c8fda7e6d25a6ff42817e563ae5c5 | |
| parent | 8c5988bf61c10317eccbd5dd15496a404428202f (diff) | |
drivers/display/lcd160cr: Fix bugs with lcd.get_pixel().
Fixes issues #2880 and #2881.
| -rw-r--r-- | drivers/display/lcd160cr.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/display/lcd160cr.py b/drivers/display/lcd160cr.py index a5da64348..c17a1f189 100644 --- a/drivers/display/lcd160cr.py +++ b/drivers/display/lcd160cr.py @@ -243,13 +243,13 @@ class LCD160CR: self._fcmd2b('<BBBBH', 0x41, x, y, c) def get_pixel(self, x, y): - self._fcmd2b('<BBBB', 0x61, x, y) + self._fcmd2('<BBBB', 0x61, x, y) t = 1000 while t: self.i2c.readfrom_into(self.i2c_addr, self.buf1) if self.buf1[0] >= 2: self.i2c.readfrom_into(self.i2c_addr, self.buf[3]) - return self.buf[3][1] + self.buf[3][2] << 8 + return self.buf[3][1] | self.buf[3][2] << 8 t -= 1 sleep_ms(1) raise OSError(uerrno.ETIMEDOUT) |
