Skip to content
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

How do proper cleanup/release resources when using luma.core? #242

Open
dachshund-digital opened this issue Jun 12, 2021 · 0 comments
Open
Labels

Comments

@dachshund-digital
Copy link

dachshund-digital commented Jun 12, 2021

How do proper cleanup/release resources when using luma.core? Using luma.core setting up SPI session, luma.core does not release resources? Sending SIGINT to instruct python based service (system-d) to stop, hangs sometimes, other times, returns quickly. Appears the SPI connection is not shutting down or cleaning up right? Have not found example of how to cleanup the luma.core session?

Setup....

from luma.led_matrix.device import max7219
from luma.core.interface.serial import spi, noop
from luma.core.virtual import sevensegment

ZERO=0
ONE=1
SERIAL=spi(port=ZERO, device=ZERO, gpio=noop())
DEVICE=max7219(SERIAL, cascaded=ONE)

theSegment=sevensegment(DEVICE)

But what to do for clean up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants