mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-04-25 08:23:53 +00:00
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!
This commit is contained in:
@@ -76,10 +76,12 @@ class PiGPIOFactory(PiFactory):
|
||||
port=int(os.getenv('PIGPIO_PORT', 8888))):
|
||||
super(PiGPIOFactory, self).__init__()
|
||||
self.pin_class = PiGPIOPin
|
||||
self.spi_hardware_class = PiGPIOHardwareSPI
|
||||
self.spi_software_class = PiGPIOSoftwareSPI
|
||||
self.shared_spi_hardware_class = PiGPIOHardwareSPIShared
|
||||
self.shared_spi_software_class = PiGPIOSoftwareSPIShared
|
||||
self.spi_classes = {
|
||||
('hardware', 'exclusive'): PiGPIOHardwareSPI,
|
||||
('hardware', 'shared'): PiGPIOHardwareSPIShared,
|
||||
('software', 'exclusive'): PiGPIOSoftwareSPI,
|
||||
('software', 'shared'): PiGPIOSoftwareSPIShared,
|
||||
}
|
||||
self._connection = pigpio.pi(host, port)
|
||||
self._host = host
|
||||
self._port = port
|
||||
|
||||
Reference in New Issue
Block a user