Skip to content

Commit 2b1d38e

Browse files
author
Melissa LeBlanc-Williams
committed
Fixed more Travis CI errors
1 parent c662a10 commit 2b1d38e

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

adafruit_ra8875/ra8875.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@
3232
3333
**Hardware:**
3434
35-
* `RA8875 Driver Board for 40-pin TFT Touch Displays - 800x480
36-
<https://www.adafruit.com/product/1590>`_
35+
* RA8875 Driver Board for 40-pin TFT Touch Displays - 800x480:
36+
https://www.adafruit.com/product/1590
3737
3838
**Software and Dependencies:**
3939
4040
* Adafruit CircuitPython firmware for the supported boards:
4141
https://github.com/adafruit/circuitpython/releases
4242
* Adafruit's Bus Device library:
4343
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
44-
# * Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
4544
"""
4645

4746
# imports

examples/ra8875_bmptest.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,11 @@ def draw(self, disp, x=0, y=0):
7171
for i in range(0, line_size, self.bpp//8):
7272
if (line_size-i) < self.bpp//8:
7373
break
74-
b1 = line_data[i]
75-
b2 = line_data[i+1]
7674
if self.bpp == 16:
77-
color = b1 << 8 | b2
75+
color = line_data[i] << 8 | line_data[i+1]
7876
if self.bpp == 24:
79-
b3 = line_data[i+2]
80-
color = color565(b1, b2, b3)
81-
c = struct.pack(">H", color)
82-
current_line_data = current_line_data + c
77+
color = color565(line_data[i], line_data[i+1], line_data[i+2])
78+
current_line_data = current_line_data + struct.pack(">H", color)
8379
disp.setxy(x, self.height - line + y)
8480
disp.push_pixels(current_line_data)
8581
disp.set_window(0, 0, disp.width, disp.height)

0 commit comments

Comments
 (0)