Skip to content

Commit 3fbcbd1

Browse files
committed
Fixed issue with passing inverted bits keyword arguments
1 parent a16f3bd commit 3fbcbd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_il0373.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ def __init__(self, bus, swap_rams=False, **kwargs):
8383
start_sequence[27] = (height >> 8) & 0xFF
8484
start_sequence[28] = height & 0xFF
8585
if swap_rams:
86-
color_bits_inverted = kwargs.get("black_bits_inverted", False)
86+
color_bits_inverted = kwargs.pop("black_bits_inverted", False)
8787
write_color_ram_command = 0x10
88-
black_bits_inverted = kwargs.get("color_bits_inverted", True)
88+
black_bits_inverted = kwargs.pop("color_bits_inverted", True)
8989
write_black_ram_command = 0x13
9090
else:
9191
write_black_ram_command = 0x10
9292
write_color_ram_command = 0x13
93-
color_bits_inverted = kwargs.get("color_bits_inverted", True)
94-
black_bits_inverted = kwargs.get("black_bits_inverted", False)
93+
color_bits_inverted = kwargs.pop("color_bits_inverted", True)
94+
black_bits_inverted = kwargs.pop("black_bits_inverted", False)
9595
super().__init__(bus, start_sequence, _STOP_SEQUENCE, **kwargs,
9696
ram_width=160, ram_height=296,
9797
busy_state=False,

0 commit comments

Comments
 (0)