Skip to content

Fix bit shift for panel setting register RES bits #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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