Commit Graph

38 Commits

Author SHA1 Message Date
Dave Jones
7099b56974 Fix #168 2016-02-07 19:54:39 +00:00
Dave Jones
0bc62aee73 Generic docs need reST
Conversion of all docs to reST so that the generic docs can link easily
with the rest of the docs.
2016-01-30 23:40:12 +00:00
Dave Jones
15ce68d1a7 Merge pull request #139 from waveform80/exceptions-module
Move exceptions to their own sub-module
2016-01-07 12:04:59 +00:00
Dave Jones
59ba7154c5 Move exceptions to their own sub-module
This removes the circular dependency introduced in PR#137. This also
fixes up an issue in the base meta-class which meant it wasn't working
in Python 3 (only Python 2), and adds a bit to the meta-class to allow
docstrings to be inherited (taken from the rest-docs branch).
2016-01-07 11:01:49 +00:00
Alex Chan
cca4c85afe Fix return type of TrafficLightsBuzzer.value
The FishDishTuple was renamed to TrafficLightsBuzzerTuple in
commit b87e2a4, but the `value` property wasn't modified to match.
2016-01-06 15:06:09 +00:00
Ben Nuttall
cfe200af35 Add CamJamKitRobot interface 2015-11-22 18:35:11 +00:00
Ben Nuttall
4cf634a9c3 Fix typo 2015-11-22 18:25:41 +00:00
Ben Nuttall
ef9e5802dc Merge pull request #108 from waveform80/motor-pins
Fix #107
2015-11-15 18:22:01 +00:00
Dave Jones
c929b9a53b Fix #107
Add forward_device and backward_device to Motor, left_motor and
right_motor to Robot, and ensure all CompositeDevice descendents have a
proper close() method and closed property. Also, add a few more
_check_open calls around the place to make sure GPIODeviceClosed is
properly raised in response to read and writing values.
2015-11-15 18:19:15 +00:00
Ben Nuttall
71284b233d Fix TrafficHat numbering to match promo photos, re: #65 2015-11-15 17:37:36 +00:00
Dave Jones
0c8eff6a20 Merge pull request #96 from waveform80/pwm-toggle-motor-reverse
Fix #91
2015-10-27 20:05:12 +00:00
Dave Jones
2a1ed11535 Fix #91
Override toggle() in PWMOutputDevice, and add reverse() to Motor and
Robot
2015-10-26 21:23:03 +00:00
Dave Jones
43fbf03dd7 Fix Py2 syntax and value super-call 2015-10-26 21:08:53 +00:00
Ben Nuttall
8c1f2d420f Add PWM option to add-on boards with LEDs, re: #90 2015-10-25 23:33:14 +00:00
Dave Jones
b87e2a4d53 Fix #81
Fix up the FishDish hierarchy so that all LEDS can be addressed as
`lights` directly.
2015-10-25 10:45:34 +00:00
Dave Jones
fa0a1b3cdd Fix #76, fix #79
This finishes off implementing values and source for all (current)
classes in gpiozero. I'm afraid things get rather complex in this
commit. For starters, we've now got quite a few "aggregate" classes
which necessarily don't descend from GPIODevice. To implement values and
source on these I could either repeat a helluva lot of code or ... turn
to mixin classes. Yeah, it's multiple inheritance time, baby!

Unfortunately multiple inheritance doesn't work with __slots__ but we
really ought to keep functionality that they provide us (raise
AttributeError when an unknown attribute is set). So I've implemented
this with ... erm ... metaclasses. Sorry!
2015-10-22 21:44:42 +01:00
Ryan Walmsley
f1771c1f05 Fixed TrafficHat numbering to match promo photos etc. 2015-10-13 13:52:39 +01:00
Ben Nuttall
ee36451bed Make Motors PWM devices with optional speed argument on methods 2015-10-07 17:09:28 +01:00
Dave Jones
7429c03117 Docs clean up part 1
Big push on getting the docs cleaned up before 1.0. Proper wrapping of
everything so it's decently viewable from the command line (or as
decently viewable as markdown can be - the tables will never look great
from the command line).

Only one code change in this PR: rename bouncetime to bounce_time
(everything else is PEP-8, so this probably should be too) and change
its units to seconds from milliseconds (again, all other durations in
the library are in seconds, so it feels inconsistent that this one
isn't; for the sake of those who won't read the docs - which is most
people - I figure consistency helps with guessing!).
2015-10-03 16:24:12 +01:00
Ben Nuttall
3a4d3d4deb Add documentation for Motor, Robot and RyanteckRobot 2015-10-02 18:08:59 +01:00
Ben Nuttall
dc34cf3ccf Implement Motor, Robot and RyanteckRobot 2015-10-02 15:27:55 +01:00
Ben Nuttall
3f960f6da3 Update docstrings and add initial set of documentation 2015-09-28 11:11:00 +01:00
Ben Nuttall
cfed671972 Add docstrings, close #26 2015-09-24 11:39:50 +01:00
Ben Nuttall
d47aff9f69 Make TrafficLights extend LEDBoard 2015-09-23 17:30:17 +01:00
Ben Nuttall
12800db25f Refactor PiLiter into generic LEDBoard class 2015-09-23 16:32:00 +01:00
Ben Nuttall
b97e97909c Add flash method to output devices and boards, close #22 2015-09-23 15:31:06 +01:00
Ben Nuttall
931571b85d Add toggle to boards 2015-09-23 14:44:41 +01:00
Ben Nuttall
e805eedd13 Add properties for leds and all on boards 2015-09-23 11:42:06 +01:00
Ben Nuttall
bb33b9aff3 Fix PiTraffic and TrafficHat 2015-09-23 11:16:42 +01:00
Ben Nuttall
b16127dd39 Add PiTraffic back in (was accidentally deleted in e474215) 2015-09-22 17:18:38 +01:00
Dave Jones
3df061b1bd Minor cleanup in boards
super calls weren't specified correctly, and there's no need to convert
to lists for adding tuples - tuples add to tuples just fine, just not
lists.
2015-09-22 15:05:11 +01:00
Ben Nuttall
e4742150c4 Add Ryanteck TrafficHat based on FishDish (untested) 2015-09-21 18:40:06 +01:00
Ben Nuttall
840953fd81 Refactor and add blink method to all boards 2015-09-21 18:22:49 +01:00
Ben Nuttall
2172ed78db Add missing Buzzer import 2015-09-21 17:44:45 +01:00
Ben Nuttall
4403348917 Use super over re-implentation for PiTraffic 2015-09-21 17:30:11 +01:00
Ben Nuttall
8223e56162 Make FishDish Button pull down 2015-09-21 17:18:20 +01:00
Ben Nuttall
d5f3e849a4 Prefix lights and all properties and convert lists to tuples 2015-09-21 17:14:33 +01:00
Ben Nuttall
6d29aaa590 Implement common add-on boards, re: #17 2015-09-21 15:28:01 +01:00