gun

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gun

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

Gun is the module that controls turret firing. It supports both infrared and beads firing.

func New

New creates a new Gun instance.

func (*Gun) Connected

func (g *Gun) Connected() bool

Connected returns whether the Gun module is connected.

func (*Gun) Fire

func (g *Gun) Fire(typ Type) error

Fire fires the Gun module with the given type.

func (*Gun) Start

func (g *Gun) Start() error

Start starts the Gun module.

func (*Gun) Stop

func (g *Gun) Stop() error

Stop stops the Gun module.

func (*Gun) String

func (G *Gun) String() string

String returns a string representation of the Gun module.

func (*Gun) WaitForConnection

func (g *Gun) WaitForConnection(timeout time.Duration) bool

WaitForConnection waits for the Gun module to connect and returns the connected status.

type Type

type Type uint8
const (
	TypeBead Type = iota
	TypeInfrared
)

func (Type) String

func (t Type) String() string

func (Type) Valid

func (t Type) Valid() bool

Jump to

Keyboard shortcuts

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