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:
Dave Jones
2016-10-21 14:54:34 +01:00
parent c570b8f09b
commit b0c807da19
9 changed files with 69 additions and 69 deletions

View File

@@ -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