Skip to content

Commit 56f7d73

Browse files
committed
updates ssd1306 display driver
1 parent af98ce3 commit 56f7d73

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api_drivers/common_api_drivers/display/ssd1306/_ssd1306_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ def init(self):
3535

3636
self.set_params(_SET_SEG_REMAP | 0x01)
3737

38-
param_buf[0] = self.height - 1
38+
param_buf[0] = self.display_height - 1
3939
self.set_params(_SET_MUX_RATIO, param_mv[:1])
4040

4141
self.set_params(_SET_COM_OUT_DIR | 0x08)
4242

4343
param_buf[0] = 0x00
4444
self.set_params(_SET_DISP_OFFSET, param_mv[:1])
4545

46-
if self.width > 2 * self.height:
46+
if self.width > 2 * self.display_height:
4747
param_buf[0] = 0x02
4848
else:
4949
param_buf[0] = 0x12

api_drivers/common_api_drivers/display/ssd1306/ssd1306.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
backlight_on_state=STATE_HIGH,
3737
offset_x=0,
3838
offset_y=0,
39-
color_space=LV.COLOR_FORMAT.I1, # NOQA
39+
color_space=lv.COLOR_FORMAT.I1, # NOQA
4040
rgb565_byte_swap=False
4141
):
4242

0 commit comments

Comments
 (0)