Consider re-architecting to use Objects & Events. Maybe have a uBitConnector object (to initiate the USB connection) that emits a connected and connection-failure. Create a uBitDevice or augment the existing USBDevice to emit all the message and discnonection events (and host the disconnect() method?
Consider re-architecting to use Objects & Events. Maybe have a
uBitConnector
object (to initiate the USB connection) that emits aconnected
andconnection-failure
. Create auBitDevice
or augment the existing USBDevice to emit all the message and discnonection events (and host thedisconnect()
method?