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

v1.0 release #99

Closed
4 tasks done
bennuttall opened this issue Nov 3, 2015 · 11 comments
Closed
4 tasks done

v1.0 release #99

bennuttall opened this issue Nov 3, 2015 · 11 comments
Milestone

Comments

@bennuttall
Copy link
Member

There's a new Raspbian release in two weeks and I'd like to get a 1.0 release of GPIO Zero in there.

There are various things we've pinned down as features or additions required for v1.0. I think any missing components can be left out for now, but more importantly the API needs to be finalised.

I think the following issues need resolving:

I think we may pick up a few other minor details that need resolving before the release but I think this is roughly enough. Things like Energenie can come later, and can follow the existing API pattern.

@bennuttall bennuttall added this to the v1.0 milestone Nov 3, 2015
@waveform80
Copy link
Member

Sure, sounds good. It went down a storm at the latest picademy - GPIO workshop was much smoother and I'm convinced it helped the attendees get more done during the project day simply because less time was burned debugging stuff (sudoless GPIO was also a major help in that respect)

@bennuttall
Copy link
Member Author

Great!

@solderblob
Copy link

There is still a bouncetime (without underscore) on line 263 in input_devices.py
I use Python IDLE and have problems to stop a program that uses when_pressed and when_released - ctrl-z or ctrl-c doesn't stop it, have to use ctrl-d to kill IDLE Shell. Is there some other trick?

@waveform80
Copy link
Member

That bouncetime is meant to be there as that's what the underlying RPi.GPIO uses. We alias that to bounce_time in gpiozero for consistency with the rest of the API.

I'll have a look into the IDLE issue - if you've got reproduction code, could you put it in a new ticket so I can have a look at it?

@solderblob
Copy link

Sorry about my wrong diagnostics of the error - but the problem is still there, perhaps it's more subtle than I thought. When I run the following (stripped down) program after booting the RPi
from gpiozero import Button
button2 = Button(2)
def toggle2():
pass
button2.when_pressed = toggle2

I get the error
Traceback (most recent call last):
File "/home/pi/test.py", line 3, in
button2 = Button(2)
File "/usr/local/lib/python3.4/dist-packages/gpiozero/input_devices.py", line 399, in init
super(Button, self).init(pin, pull_up, bouncetime)
File "/usr/local/lib/python3.4/dist-packages/gpiozero/input_devices.py", line 256, in init
bouncetime=-666 if bounce_time is None else int(bounce_time * 1000)
RuntimeError: Failed to add edge detection

but if I make a new attempt to run the program, the error disappears. With my original slightly longer program I had to restart it three times before the error disappears. A reboot of the RPi is needed to make the problem appear again, a restart of Python is not enough to get the error.

@bennuttall
Copy link
Member Author

I'm having the same issue myself. I notice that every time I try to create a Button it raises RuntimeError: Failed to add edge detection. I have to run it twice to get it to work.

@bennuttall
Copy link
Member Author

I think all we need to do now is quickly fix #75, drop #93 and decide on #92 then #44 will can be done completing the release.

@bennuttall
Copy link
Member Author

The new Raspbian will be going out in the next week so we should be in it!

@waveform80
Copy link
Member

The failed to add edge detection issue is an issue in the underlying RPi.GPIO; we've got it as #50 which I should re-open as I've hit this a couple of times myself. I'm pretty sure it's a race condition in RPi.GPIO's event detection code (which manipulates a linked list in two threads without any mutex protection), but I'm going to need some time to track it down and squish it.

In other words, it's not an error in gpiozero per sé but we do need to get it fixed in the underlying library for the sake of ease of use. Given the complexity of the issue (it's likely a C-based multi-thread race condition), I doubt I'll track it down before 1.0. Even if I did, it's in a library we don't control, so I can't guarantee it'd be released alongside 1.0 anyway, but I'll certainly do what I can to fix it.

@bennuttall
Copy link
Member Author

Ok that's everything sorted. Let's check over everything, update the docs and @waveform80 you can create a package when you think it's ready.

@bennuttall
Copy link
Member Author

\o/

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

No branches or pull requests

3 participants