uraimo / SwiftyGPIO

A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add CustomStringConvertible to `SwiftyGPIO.RaspberryGPIO`

helje5 opened this issue · comments

It would be nice if SwiftyGPIO.RaspberryGPIO would have a description (aka conform to the CustomStringConvertible protocol) containing all its properties. When you currently do a

button.onChange  { gpio in
  print("Value changed:", gpio)
}

You just get a:

Value changed: SwiftyGPIO.RaspberryGPIO

Agreed, I suspect it was printing something more useful in one of the older releases, hmmm.