idasen

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IDASEN_MIN_HEIGHT                   = 0.62
	IDASEN_MAX_HEIGHT                   = 1.27
	IDASEN_UUID_HEIGHT                  = "99fa0021-338a-1024-8a49-009c0215f78a"
	IDASEN_UUID_COMMAND                 = "99fa0002-338a-1024-8a49-009c0215f78a"
	IDASEN_UUID_REFERENCE_INPUT         = "99fa0031-338a-1024-8a49-009c0215f78a"
	IDASEN_COMMAND_REFERENCE_INPUT_STOP = []byte{0x01, 0x80}
	IDASEN_COMMAND_UP                   = []byte{0x47, 0x00}
	IDASEN_COMMAND_DOWN                 = []byte{0x46, 0x00}
	IDASEN_COMMAND_STOP                 = []byte{0xFF, 0x00}

	ErrHeightBiggerThanMax  = errors.New("height is bigger than the max height")
	ErrHeightSmallerThanMin = errors.New("height is smaller than the min height")
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(deskAddress string) (*Controller, error)

func (*Controller) GetCurrentHeight

func (c *Controller) GetCurrentHeight() (float32, error)

func (*Controller) MoveTo

func (c *Controller) MoveTo(ctx context.Context, desiredHeight float32, updates chan<- float32) error

type DeviceInfo

type DeviceInfo struct {
	Name    string
	Address string
}

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner() (*Scanner, error)

func (*Scanner) Scan

func (s *Scanner) Scan(ctx context.Context, dic chan<- DeviceInfo)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL