Skip to content

Commit

Permalink
Merge pull request #18 from peterhinch/patch-1
Browse files Browse the repository at this point in the history
Fix bit shift for panel setting register RES bits
  • Loading branch information
tannewt committed Jan 14, 2021
2 parents 89b14b0 + db2307e commit b792e74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adafruit_il0373.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ def __init__(self, bus, swap_rams=False, **kwargs):

# Set the resolution to scan
if width > 128:
start_sequence[17] |= 0b11 << 5 # 160x296
start_sequence[17] |= 0b11 << 6 # 160x296
elif height > 252 or width > 96:
start_sequence[17] |= 0b10 << 5 # 128x296
start_sequence[17] |= 0b10 << 6 # 128x296
elif height > 230:
start_sequence[17] |= 0b01 << 5 # 96x252
start_sequence[17] |= 0b01 << 6 # 96x252
else:
pass # 0b00 is 96x230

Expand Down

0 comments on commit b792e74

Please sign in to comment.