Closed depili closed 5 years ago
Currently the Pin struct doesn't export a way of getting the pin number that caused to watcher handler to run.
This makes writing generic handlers impossible.
Adding a reader to the Pin struct for the internal pin value would make things way easier. Something like
func (pin *Pin) Pin() uint8 { return pin.pin }
Another option would be to export the pin field, but then it would be possible to set that value externally.
True enough. Added Pin in 183f0efb.
Thank you.
Currently the Pin struct doesn't export a way of getting the pin number that caused to watcher handler to run.
This makes writing generic handlers impossible.
Adding a reader to the Pin struct for the internal pin value would make things way easier. Something like
Another option would be to export the pin field, but then it would be possible to set that value externally.