Adjust colstart to support top/bottom row correction
Added column_corection argument to ssd1680 to set colstart so can be adjusted in simpletest to fix issue #10 and can still work with previous sampletest file if needed as only tested on ESP32-S2.
This commit is contained in:
parent
68ba28bce2
commit
e181b0ac6e
2 changed files with 10 additions and 6 deletions
|
|
@ -18,6 +18,7 @@ Implementation Notes
|
|||
|
||||
* `Adafruit 2.13" Tri-Color eInk Display Breakout <https://www.adafruit.com/product/4947>`_
|
||||
* `Adafruit 2.13" Tri-Color eInk Display FeatherWing <https://www.adafruit.com/product/4814>`_
|
||||
* `Adafruit 2.13" Mono eInk Display FeatherWing <https://www.adafruit.com/product/4195>`_
|
||||
|
||||
|
||||
**Software and Dependencies:**
|
||||
|
|
@ -51,6 +52,7 @@ class SSD1680(displayio.EPaperDisplay):
|
|||
r"""SSD1680 driver
|
||||
|
||||
:param bus: The data bus the display is on
|
||||
:param column_correction: Adjust colstart, defaults to 1 (``int``)
|
||||
:param \**kwargs:
|
||||
See below
|
||||
|
||||
|
|
@ -63,7 +65,7 @@ class SSD1680(displayio.EPaperDisplay):
|
|||
Display rotation
|
||||
"""
|
||||
|
||||
def __init__(self, bus: displayio.Fourwire, **kwargs) -> None:
|
||||
def __init__(self, bus: displayio.Fourwire, column_correction=1, **kwargs) -> None:
|
||||
stop_sequence = bytearray(_STOP_SEQUENCE)
|
||||
try:
|
||||
bus.reset()
|
||||
|
|
@ -95,6 +97,6 @@ class SSD1680(displayio.EPaperDisplay):
|
|||
set_current_column_command=0x4E,
|
||||
set_current_row_command=0x4F,
|
||||
refresh_display_command=0x20,
|
||||
colstart=1,
|
||||
colstart=column_correction,
|
||||
always_toggle_chip_select=True,
|
||||
)
|
||||
)
|
||||
|
|
@ -9,10 +9,9 @@ Supported products:
|
|||
* https://www.adafruit.com/product/4947
|
||||
* Adafruit 2.13" Tri-Color eInk Display FeatherWing
|
||||
* https://www.adafruit.com/product/4814
|
||||
* Adafruit 2.13" Mono eInk Display FeatherWing
|
||||
* https://www.adafruit.com/product/4195
|
||||
|
||||
To use Adafruit 2.13" Monochrome FeatherWing - 250x122 Monochrome with SSD1680:
|
||||
* https://www.adafruit.com/product/4195
|
||||
Set change height in display from 122 to 127
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -35,8 +34,10 @@ display_bus = displayio.FourWire(
|
|||
)
|
||||
time.sleep(1)
|
||||
|
||||
# For issues with display not updating top/bottom rows correctly set column_correction to 8
|
||||
display = adafruit_ssd1680.SSD1680(
|
||||
display_bus,
|
||||
column_correction=1,
|
||||
width=250,
|
||||
height=122,
|
||||
busy_pin=epd_busy,
|
||||
|
|
@ -44,6 +45,7 @@ display = adafruit_ssd1680.SSD1680(
|
|||
rotation=270,
|
||||
)
|
||||
|
||||
|
||||
g = displayio.Group()
|
||||
|
||||
with open("/display-ruler.bmp", "rb") as f:
|
||||
|
|
|
|||
Loading…
Reference in a new issue