Skip to content

Commit 371a3ee

Browse files
committed
reverts some of the changes made to the ili9341 driver.
I had hard coded `color_space` to BGR when it turns out that there are variants that use RGB. So I am defaulting `color_space` to RGB which is what is done across the board for all other display drivers. The users that have the BGR type displays IC's will need to set this parameter. Fixes #55
1 parent 74fb918 commit 371a3ee

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

api_drivers/common_api_drivers/display/ili9341.py

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -40,51 +40,6 @@
4040

4141
class ILI9341(display_driver_framework.DisplayDriver):
4242

43-
def __init__(
44-
self,
45-
data_bus,
46-
display_width,
47-
display_height,
48-
frame_buffer1=None,
49-
frame_buffer2=None,
50-
reset_pin=None,
51-
reset_state=STATE_LOW,
52-
power_pin=None,
53-
power_on_state=STATE_HIGH,
54-
backlight_pin=None,
55-
backlight_on_state=STATE_HIGH,
56-
offset_x=0,
57-
offset_y=0,
58-
color_byte_order=BYTE_ORDER_RGB, # NOQA
59-
color_space=lv.COLOR_FORMAT.RGB565,
60-
rgb565_byte_swap=False
61-
):
62-
63-
if (
64-
color_space == lv.COLOR_FORMAT.RGB565 and
65-
isinstance(data_bus, (lcd_bus.SPIBus, lcd_bus.I80Bus))
66-
):
67-
rgb565_byte_swap = True
68-
69-
super().__init__(
70-
data_bus=data_bus,
71-
display_width=display_width,
72-
display_height=display_height,
73-
frame_buffer1=frame_buffer1,
74-
frame_buffer2=frame_buffer2,
75-
reset_pin=reset_pin,
76-
reset_state=reset_state,
77-
power_pin=power_pin,
78-
power_on_state=power_on_state,
79-
backlight_pin=backlight_pin,
80-
backlight_on_state=backlight_on_state,
81-
offset_x=offset_x,
82-
offset_y=offset_y,
83-
color_byte_order=BYTE_ORDER_BGR,
84-
color_space=color_space,
85-
rgb565_byte_swap=rgb565_byte_swap
86-
)
87-
8843
def init(self, sequence=1):
8944
param_buf = bytearray(15)
9045
param_mv = memoryview(param_buf)

0 commit comments

Comments
 (0)