Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for finding and interacting with Vogels MotionMount devices over Bluetooth
func DefaultClient ¶
DefaultClient returns a client using the default bluetooth adapter
func (*Client) Scan ¶
func (c *Client) Scan(ctx context.Context, results chan<- *MotionMount) error
Scan will scan for MotionMount devices, it will scan continuously until the context is canceled adding each new device to the output channel.
It will not return the same MotionMount device multiple times.
type MotionMount ¶
type MotionMount struct {
// contains filtered or unexported fields
}
MotionMount is a Vogels MotionMount device
func (*MotionMount) Close ¶
func (m *MotionMount) Close() error
Close will disconnect from the MotionMount, the MotionMount will be re-connected to for any further calls.
func (*MotionMount) GetPosition ¶
func (m *MotionMount) GetPosition() (Position, error)
GetPosition returns the current Position of the MotionMount
func (*MotionMount) GetPositionsPresets ¶
func (m *MotionMount) GetPositionsPresets() ([]Position, error)
GetPositionsPresets returns all configured presets for the MotionMount
func (*MotionMount) MoveToPosition ¶
func (m *MotionMount) MoveToPosition(position Position) error
MoveToPosition moves the MotionMount to a given position
func (*MotionMount) Name ¶
func (m *MotionMount) Name() string
Name is the name of the MotionMount device
type Position ¶
type Position struct { // Label is defined for "Preset" positions Label string // WallDistance is an int between 0 and 100. WallDistance int16 // Orientation is an int between -100 and 100, a negative int orients the // MotionMount right, a positive int orients it left. Orientation int16 }
Position is a position struct for the MotionMount