Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
  • Loading branch information
ladyada committed Jul 9, 2021
commit 6fb814511875f98d5e1ce783b2ca436e1c37ce0f
4 changes: 2 additions & 2 deletions adafruit_displayio_sh1107.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import displayio
from micropython import const
import os
import sys

__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SH1107.git"
Expand Down Expand Up @@ -67,7 +67,7 @@

# Sequence from sh1107 framebuf driver formatted for displayio init
# we fixed sh110x addressing in 7, so we have slightly different setups
if int(os.uname().release.split('.')[0]) < 7:
if sys.implementation.version[0] < 7:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmm .. it seems like this lib is also used on standard python3 (is in pypi) where sys.implementation.version is currently 3. I guess this means that python3 also keeps using the old behavior, which is fine for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont even think that oleds are supported in blinka? or this special oled method

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, but it's in pypi. https://pypi.org/project/adafruit-circuitpython-displayio-sh1107/

I think it's fine, since 3<7 so this doesn't change anything on blinka.

_INIT_SEQUENCE = (
b"\xae\x00" # display off, sleep mode
b"\xdc\x01\x00" # display start line = 0 (POR = 0)
Expand Down