Skip to content

lint #1

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 3 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
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
57 changes: 50 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,13 @@ This is easily achieved by downloading
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.

.. todo:: Describe the Adafruit product this library works with. For PCBs, you can also add the
image from the assets folder in the PCB's GitHub repo.
* `Waveshare 7.3" F <https://www.waveshare.com/7.3inch-e-paper-hat-f.htm>`_

`Purchase one from the Adafruit shop <http://www.adafruit.com/products/>`_
Installing from PyPI
=====================
.. note:: This library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!
Comment on lines 43 to 44
Copy link
Member

Choose a reason for hiding this comment

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

Since Thonny looks for PyPI, everything is being added there. The release workflow will do it and now there's no setup.py.disabled file to prevent it. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's correct it looks like it will get pushed to pypi once a release is made if everything works out.

This note is just leftover from the cookiecutter, I recall seeing it before. Maybe there is a case in there where we could tweak the default to not include this message for adafruit libraries.

I tried to push the change here to remove it, but don't have access (or my ide/git integration is messed up).

I found another small change needed for this repo and the other 7 color eink one.

I'll merge this and then remove the note in a followup with that other change.

Copy link
Contributor

Choose a reason for hiding this comment

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

the problem pushing does seem to be something wonky on my side. I had the same problem pushing to my own fork but think It's straightened out for now.


.. todo:: Remove the above note if PyPI version is/will be available at time of release.

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-acep7in/>`_.
To install for current user:
Expand Down Expand Up @@ -96,8 +92,55 @@ Or the following command to update an existing version:
Usage Example
=============

.. todo:: Add a quick, simple example. It and other examples should live in the
examples folder and be included in docs/examples.rst.
.. code-block:: python

# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense

"""Simple test script for 5.6" 600x448 7-color ACeP display.
"""
# pylint: disable=no-member

import time
import board
import displayio
import adafruit_acep7in

displayio.release_displays()

# This pinout works on a Feather RP2040 and may need to be altered for other boards.
spi = board.SPI() # Uses SCK and MOSI
epd_cs = board.D9
epd_dc = board.D10
epd_reset = board.D11
epd_busy = board.D12

display_bus = displayio.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)

display = adafruit_acep7in.ACeP7In(
display_bus, width=800, height=480, busy_pin=epd_busy
)

g = displayio.Group()

fn = "/display-ruler-720p.bmp"

with open(fn, "rb") as f:
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)

display.show(g)

display.refresh()

time.sleep(120)


Documentation
=============
Expand Down
38 changes: 19 additions & 19 deletions adafruit_acep7in.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,29 @@
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ACeP7In.git"

_START_SEQUENCE = (
b"\xaa\x06\x49\x55\x20\x08\x09\x18" # CMDH
b"\xaa\x06\x49\x55\x20\x08\x09\x18" # CMDH
b"\x01\x06\x3F\x00\x32\x2A\x0E\x2A" # power setting PWRR
b"\x00\x02\x5f\x69" # panel setting (PSR)
b"\x03\x04\x00\x54\x00\x44" # POFS
b"\x05\x04\x40\x1F\x1F\x2C" # booster BTST1
b"\x06\x04\x6F\x1F\x16\x25" # booster BTST2
b"\x08\x04\x6F\x1F\x1F\x22" # booster BTST3
b"\x13\x02\x00\x04" # IPC
b"\x30\x01\x02" # PLL setting
b"\x41\x01\x00" # TSE
b"\x50\x01\x3F" # vcom and data interval setting
b"\x60\x02\x02\x00" # tcon setting
b"\x61\x04\x03\x20\x01\xe0" # tres
b"\x82\x01\x1e" # vdcs
b"\x84\x01\x00" # t_vdcs
b"\x86\x01\x00" # agid
b"\xe3\x01\x2f" # PWS
b"\xe0\x01\x00" # ccset
b"\xe6\x01\x00" # tsset
b"\x00\x02\x5f\x69" # panel setting (PSR)
b"\x03\x04\x00\x54\x00\x44" # POFS
b"\x05\x04\x40\x1F\x1F\x2C" # booster BTST1
b"\x06\x04\x6F\x1F\x16\x25" # booster BTST2
b"\x08\x04\x6F\x1F\x1F\x22" # booster BTST3
b"\x13\x02\x00\x04" # IPC
b"\x30\x01\x02" # PLL setting
b"\x41\x01\x00" # TSE
b"\x50\x01\x3F" # vcom and data interval setting
b"\x60\x02\x02\x00" # tcon setting
b"\x61\x04\x03\x20\x01\xe0" # tres
b"\x82\x01\x1e" # vdcs
b"\x84\x01\x00" # t_vdcs
b"\x86\x01\x00" # agid
b"\xe3\x01\x2f" # PWS
b"\xe0\x01\x00" # ccset
b"\xe6\x01\x00" # tsset
b"\x04\x80\xc8" # power on and wait 10 ms
)

_STOP_SEQUENCE = b"\x02\x01\x00" # Power off only
_STOP_SEQUENCE = b"\x02\x01\x00" # Power off only
# pylint: disable=too-few-public-methods
class ACeP7In(displayio.EPaperDisplay):
r"""Display driver for 7" ACeP epaper display. Driver IC name is unknown.
Expand Down
6 changes: 1 addition & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ Table of Contents
.. toctree::
:caption: Tutorials

.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave
the toctree above for use later.

.. toctree::
:caption: Related Products

.. todo:: Add any product links here. If there are none, then simply delete this todo and leave
the toctree above for use later.
Waveshare 7.3" F <https://www.waveshare.com/7.3inch-e-paper-hat-f.htm>

.. toctree::
:caption: Other Links
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ requires = [

[project]
name = "adafruit-circuitpython-acep7in"
description = "Driver for 7.3" 7-color (aka ACeP) epaper display"
description = "Driver for 7.3\" 7-color (aka ACeP) epaper display"
version = "0.0.0+auto.0"
readme = "README.rst"
authors = [
Expand Down