Dave Jones
cab6cc8086
Rework when_changed attribute to use weakrefs
...
Some fairly major changes to ensure that the Pin.when_changed property
doesn't keep references to the objects owning the callbacks that are
assigned. This is vaguely tricky given that ordinary weakref's can't be
used with bound methods (which are ephemeral), so I've back-ported
weakref.WeakMethod from Py3.4.
This solves a whole pile of things like Button instances not
disappearing when they're deleted, and makes composite devices
containing Buttons much easier to construct as we don't need to worry
about partially constructed things not getting deleted.
2017-06-16 13:28:55 +01:00
Dave Jones
08076e8d0e
Inline the SPI hardware args (neater code)
2017-06-16 13:28:55 +01:00
Dave Jones
cbff81f3a1
Simplify SPI bit-banging implementation
...
And add some comments to make stuff clearer
2017-06-16 13:28:55 +01:00
Dave Jones
a9f9aa4a3e
Catch SPI conflicts properly
...
Also handle SPI flags in pigpio implementation more elegantly (just
store the flags and manipulate them instead of keeping separate fields)
2017-06-16 13:28:55 +01:00
Dave Jones
ba1a7e6497
Add configuration of mock factory via env-vars
...
Also tidied up some docs
2017-06-16 13:28:55 +01:00
Dave Jones
b0c807da19
More tidying up
...
Ensure LEDCollection cleans up upon construction failure, rename some
internals to be a bit more obvious, rename PinGPIOUnsupported to
PinUnsupported, and some other stuff I've forgotten!
2017-06-16 13:28:55 +01:00
Dave Jones
c570b8f09b
Clean up repeated string substitutions
2017-06-16 13:28:55 +01:00
Dave Jones
4d79dc74db
Removed redundant weakref references
...
Also tweaked a couple of minor bits (SPI bus init mask) and unused
_get_address override
2017-06-16 13:28:55 +01:00
Dave Jones
ce6217c14f
Fix #459 - properly support remote SPI with pigpio
...
Sorry! Dave's messing around with the pin implementations again.
Hopefully the last time. The pin_factory is now really a factory object
which can be asked to produce individual pins or pin-based interfaces
like SPI (which can be supported properly via pigpio).
2017-06-16 13:28:55 +01:00
Dave Jones
4e62990917
Merge remote-tracking branch 'upstream/lenient_revision_parser'
...
Conflicts:
gpiozero/pins/data.py
2017-06-13 18:19:02 +01:00
Dave Jones
d6475f64d8
Added pinout.xyz link, per Ben's suggestion
2017-06-13 16:17:24 +01:00
Dave Jones
4725c6b68c
Tidy up pinout a little:
...
Ensure all error messages are printed on stderr instead of stdout; make
sure all errors formatted the same and that argparse's default exit
codes are followed
2017-06-13 16:15:15 +01:00
Dave Jones
97ffabe764
Fix up missing board stuff
...
Also ensure the Zero W gets represented properly on board output and
tidy up some spacing
2017-06-13 16:02:07 +01:00
Dave Jones
900affbf7f
Merge remote-tracking branch 'upstream/1.3.2-updates'
...
Conflicts:
docs/changelog.rst
gpiozero/pins/data.py
2017-06-13 15:48:02 +01:00
Dave Jones
32d6db4dfe
Merge pull request #504 from RPi-Distro/pinout-cli-tool
...
Add pinout cli tool, close #444 , close #497
2017-06-13 13:22:52 +01:00
Ben Nuttall
7d8de63f6d
Correct classname in docstring PingDevice -> PingServer
2017-03-06 16:40:16 +00:00
Ben Nuttall
f5f827c0ec
Add missing quote
2017-03-03 13:11:49 +00:00
Andrew Scheller
5b91e55e96
Add details for Chinese Pi Zero (on top of v1.3.1.post1)
2017-03-03 12:55:18 +00:00
Andrew Scheller
82050d3d5a
Add details for 512MB Pi A+ (on top of v1.3.1.post1)
2017-03-03 12:55:07 +00:00
Andrew Scheller
71fed0e851
Add BCM2837-based Pi2B details (on top of v1.3.1.post1)
2017-03-03 12:54:53 +00:00
Andrew Scheller
8c7bd5f51f
Add Pi Zero W details (on top of v1.3.1.post1)
2017-03-03 12:54:42 +00:00
Andrew Scheller
dc0c119cbb
Add Sony Japan manufactured Pi 3B details (on top of v1.3.1.post1)
2017-03-03 12:54:29 +00:00
Andrew Scheller
4e2798dcd0
Add Compute Module 3 details (on top of v1.3.1.post1)
2017-03-03 12:54:14 +00:00
Andrew Scheller
1b2415a4c2
Supply 'default' values for some of the pi-revision fields, where appropriate
2017-01-22 17:10:32 +00:00
Andrew Scheller
17024c9ba3
Separate out the revision-code parsing and decoding
2017-01-22 16:51:42 +00:00
Andrew Scheller
fc54667f34
More small tidyups
...
- switch to using sys.exit instead of exit
- always exit with error-code 1
- don't bother testing error-codes
- documentation wording tweak
2016-12-18 03:33:50 +00:00
Ben Nuttall
02938b48ec
Tidy up pinout tool PR
2016-12-05 21:03:06 +00:00
Ben Nuttall
6e6c80a9fa
Merge branch 'master' of https://github.com/stewartadcock/python-gpiozero into stewartadcock-master
2016-12-05 20:56:25 +00:00
Stewart
a812bfedeb
Fix minor typo
2016-11-07 22:34:41 +00:00
Stewart
726e861238
Add pinout command-line tool
2016-11-07 22:09:59 +00:00
SteveAmor
9299438147
Correct small typo
2016-10-17 20:38:45 +00:00
Andrew Scheller
f3ccaf891c
Update for rev 1.0 2B
2016-09-22 23:19:20 +01:00
Ben Nuttall
69aaa627fc
Correct B+/2B release date change
2016-09-22 16:41:39 +01:00
Ben Nuttall
2046af7454
Add release date for new BCM2837-based Pi 2B
...
I think this is all that's needed to make pi_info accurate
2016-09-22 15:25:27 +01:00
Dave Jones
9cbcd079e6
Merge pull request #460 from lurch/alternating_values
...
Add a new alternating_values SourceTool
2016-09-21 19:10:54 +01:00
Andrew Scheller
9fbed050ce
Add a new alternating_values SourceTool
2016-09-21 16:16:42 +01:00
Andrew Scheller
ac37ec26bc
Refactor GPIOQueue.fill()
...
squash the two while loops down into one
2016-09-21 00:09:41 +01:00
Dave Jones
9046ea3033
Fix #436
...
Permit partial, partialmethod, and wraps to be used with event handlers
2016-09-20 11:16:04 +01:00
Ben Nuttall
a79f8ccc16
Merge pull request #446 from lurch/traffic_lights_tweak
...
Add extra TrafficLight tests, and remove the redundant setattr function
2016-09-19 14:13:51 +01:00
Ben Nuttall
bda5bcab76
Merge pull request #433 from RPi-Distro/lurch-patch-1
...
Default to 'full' content in __format__
2016-09-19 14:11:20 +01:00
Ben Nuttall
12932c67d8
Merge pull request #441 from lurch/add_pistop_board
...
Add support for the Pi-Stop Traffic-light board
2016-09-19 14:10:50 +01:00
Andrew Scheller
73bfa31603
Actually report the class name for closed CompositeDevices
2016-09-19 12:21:54 +01:00
Andrew Scheller
1b3e6a429b
Add extra TrafficLight tests, and remove the redundant setattr function
...
- `CompositeDevice`s can't have any of their attributes set anyway
2016-09-19 12:00:38 +01:00
Andrew Scheller
eaa6016ded
Typo
2016-09-19 11:00:28 +01:00
Andrew Scheller
c35741c793
Add support for the Pi-Stop Traffic-light board
2016-09-19 01:11:29 +01:00
Andrew Scheller
4e66c0fcd3
Default to 'full' content in __format__
...
...when no explicit content argument is given
2016-09-13 23:50:19 +01:00
Dave Jones
27c0703043
Fix #354
...
Actually, "fix" doesn't really do this justice. This is closer to "nukes
from orbit" ...
2016-09-13 17:37:17 +01:00
Dave Jones
737a739cd6
Fix #421
...
Added SPI tests, simplified the shared SPI software bus implementation,
and fixed several protocol errors in our MCP3xxx classes (the x2 and x1
protocols were wrong)
2016-09-08 22:24:06 +01:00
Dave Jones
b6fb8bf748
Merge pull request #281 from lurch/adc_tweaks
...
Tweak the ADC classes to make the docs neater and more accurate
2016-09-08 15:48:08 +01:00
Ben Nuttall
89062ed4c2
Add quotes to dict keys
...
This is a bug introduced in v1.3.0. Currently, hardware SPI is not possible because the NameError is caught on 418 and incorrectly dealt with. The plan is to do a point release v1.3.1 to address this.
2016-08-31 15:04:07 +01:00