While the tests work well on a PC or Travis, the Pi (where I ought to be
running them!) has some issues with the timing tests. Need to relax the
tolerance of the "assert_states_and_times" method to 0.05 seconds
otherwise it periodically fails even on something reasonably quick like
a Pi 2 (less failures on a Pi 3 but still occasionally).
Also reduced default fps to 25; if the default timing occasionally fails
on a Pi 2 it's evidently too fast for a Pi 1 and shouldn't be the
default; 25 also doesn't look any different to me on a pulsing LED.
There's also a bunch of miscellaneous fixes in here; last minute typos
and chart re-gens for the 1.2 release.
Also re-numbers energenie sockets 1-4 (as noted by @bennuttall in
comments to #239), and adds several "real pins" tests and board tests.
The bad-PWM stuff is currently disabled as it causes segfaults when
running the tests and I can't seem to trace the cause at the moment.
Finally, I've tweaked the deb config to suggest gpiozero, removed spidev
as a mandatory dep (which'll fix installs on wheezy for py3), and
there's some more miscellaneous last-minute stuff here that I can't
recall...
Related to @lurch's comments on #148, this PR contains a database of
pins for each Pi revision, along with various other bits of miscellany
(I might've gotten a bit carried away here...).
Any corrections/extensions welcome!
Me and my big mouth. No sooner do I declare the base classes "relatively
stable" than I go and mess around with it all again. Anyway, this is the
long promised set of utilities to make source/values more interesting.
It includes a few interesting little utility functions, a whole bunch of
examples and introduces the notion of "pseudo" devices with no (obvious)
hardware representation like a time-of-day device.
This necessitated making the event system a little more generic (it's
not exclusive the GPIO devices after all; no reason we can't use it on
composite devices in future) and by this point the mixins have gotten
large enough to justify their own module.
The pseudo-devices are a bit spartan and basic at the moment but I'm
sure there'll be plenty of future ideas...
Changed pin.function so that it's always read-write, which in turn
permits InputDevice to force pin.function to "input" rather than
checking that it's not "input" first. This ensures internal state in
RPi.GPIO and RPIO reflects the reality of each pin's function (see
discussion under the ticket for more detail).