Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDisconnected is the error returned when there is no connection. ErrDisconnected = errors.New("disconnected") // ErrDiscover is the error returned when there was an issue // discovering the Launch. ErrDiscover = errors.New("could not discover launch") // ErrInit is the error returned when there was an issue initializing // the Launch. ErrInit = errors.New("initialization error") // ErrUnknownMode is the error returned when someone wants to send a // (yet) unknown mode. ErrUnknownMode = errors.New("unknown mode") )
Functions ¶
func NewDefaultDevice ¶
NewDefaultDevice is platform specific, see ble documentation for details.
Types ¶
type Launch ¶
type Launch interface { // Connect will (re)connect to the Launch. Connect(ctx context.Context) error // Disconnect will disconnect to the Launch. Disconnect() // Move moves to position at speed in percent. Move(position, speed int) // HandleDisconnect registers a function to call when a device disconnects HandleDisconnect(f func()) }
Launch interface represents a device that can move like a Launch.
func NewButtplugLaunch ¶
NewButtplugLaunch creates a new Launch connected via the Buttplug server running at addr. Identify with the Buttplug server with the given name.
func NewLaunch ¶
func NewLaunch() Launch
NewLaunch creates and returns a Launch client that can be used to communicate.
func NewLaunchWithDevice ¶
NewLaunchWithDevice creates and returns a Launch client that can be used to communicate over specified Bluetooth device.
Click to show internal directories.
Click to hide internal directories.