Skip to content

Commit

Permalink
Merge pull request #19 from makermelissa/fix-offset
Browse files Browse the repository at this point in the history
Fix column offset for ssd1680 instead of ssd1675
  • Loading branch information
tannewt authored Oct 2, 2023
2 parents e3791ca + 6e602b3 commit 966bf35
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion adafruit_ssd1680.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SSD1680(displayio.EPaperDisplay):

def __init__(self, bus: displayio.FourWire, **kwargs) -> None:
if "colstart" not in kwargs:
kwargs["colstart"] = 1
kwargs["colstart"] = 8
stop_sequence = bytearray(_STOP_SEQUENCE)
try:
bus.reset()
Expand Down
4 changes: 1 addition & 3 deletions examples/ssd1680_2.13_featherwing.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)

t = displayio.TileGrid(
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
)
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)

g.append(t)

Expand Down
4 changes: 1 addition & 3 deletions examples/ssd1680_2.13_tricolor_breakout.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)

t = displayio.TileGrid(
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
)
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)

g.append(t)

Expand Down
9 changes: 2 additions & 7 deletions examples/ssd1680_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# For issues with display not updating top/bottom rows correctly set colstart to 8
display = adafruit_ssd1680.SSD1680(
display_bus,
colstart=1,
colstart=8,
width=250,
height=122,
busy_pin=epd_busy,
Expand All @@ -50,12 +50,7 @@

with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
# CircuitPython 6 & 7 compatible
t = displayio.TileGrid(
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
)
# CircuitPython 7 compatible only
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)

display.show(g)
Expand Down

0 comments on commit 966bf35

Please sign in to comment.