Skip to content

Commit b792e74

Browse files
authored
Merge pull request #18 from peterhinch/patch-1
Fix bit shift for panel setting register RES bits
2 parents 89b14b0 + db2307e commit b792e74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_il0373.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ def __init__(self, bus, swap_rams=False, **kwargs):
173173

174174
# Set the resolution to scan
175175
if width > 128:
176-
start_sequence[17] |= 0b11 << 5 # 160x296
176+
start_sequence[17] |= 0b11 << 6 # 160x296
177177
elif height > 252 or width > 96:
178-
start_sequence[17] |= 0b10 << 5 # 128x296
178+
start_sequence[17] |= 0b10 << 6 # 128x296
179179
elif height > 230:
180-
start_sequence[17] |= 0b01 << 5 # 96x252
180+
start_sequence[17] |= 0b01 << 6 # 96x252
181181
else:
182182
pass # 0b00 is 96x230
183183

0 commit comments

Comments
 (0)