Files
python-gpiozero/gpiozero/__init__.py
Dave Jones c2a9392ea5 Make tests work reliably on the Pi
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.
2016-04-08 23:11:14 +01:00

124 lines
2.0 KiB
Python

from __future__ import (
unicode_literals,
print_function,
absolute_import,
division,
)
from .pins import (
Pin,
)
from .pins.data import (
PiBoardInfo,
PinInfo,
pi_info,
)
from .exc import (
GPIOZeroError,
DeviceClosed,
BadEventHandler,
BadWaitTime,
BadQueueLen,
CompositeDeviceError,
CompositeDeviceBadName,
CompositeDeviceBadOrder,
SPIError,
SPIBadArgs,
EnergenieSocketMissing,
EnergenieBadSocket,
GPIODeviceError,
GPIODeviceClosed,
GPIOPinInUse,
GPIOPinMissing,
InputDeviceError,
OutputDeviceError,
OutputDeviceBadValue,
PinError,
PinInvalidFunction,
PinInvalidState,
PinInvalidPull,
PinInvalidEdges,
PinSetInput,
PinFixedPull,
PinEdgeDetectUnsupported,
PinPWMError,
PinPWMUnsupported,
PinPWMFixedValue,
PinUnknownPi,
PinMultiplePins,
PinNoPins,
GPIOZeroWarning,
SPIWarning,
SPISoftwareFallback,
)
from .devices import (
Device,
GPIODevice,
CompositeDevice,
)
from .mixins import (
SharedMixin,
SourceMixin,
ValuesMixin,
EventsMixin,
HoldMixin,
)
from .input_devices import (
InputDevice,
DigitalInputDevice,
SmoothedInputDevice,
Button,
LineSensor,
MotionSensor,
LightSensor,
DistanceSensor,
)
from .spi_devices import (
SPIDevice,
AnalogInputDevice,
MCP3001,
MCP3002,
MCP3004,
MCP3008,
MCP3201,
MCP3202,
MCP3204,
MCP3208,
MCP3301,
MCP3302,
MCP3304,
)
from .output_devices import (
OutputDevice,
DigitalOutputDevice,
PWMOutputDevice,
PWMLED,
LED,
Buzzer,
Motor,
RGBLED,
)
from .boards import (
CompositeOutputDevice,
LEDCollection,
LEDBoard,
LEDBarGraph,
PiLiter,
PiLiterBarGraph,
TrafficLights,
PiTraffic,
SnowPi,
TrafficLightsBuzzer,
FishDish,
TrafficHat,
Robot,
RyanteckRobot,
CamJamKitRobot,
Energenie,
)
from .other_devices import (
InternalDevice,
PingServer,
TimeOfDay,
)