Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller describes the reference to the hardware device
func New ¶
func New(reader io.Reader) *Controller
New returns a new controller which transforms input from the device to a valid controller state
func (*Controller) Errors ¶ added in v1.0.1
func (c *Controller) Errors() <-chan error
Errors returns a channel of reader errors
func (*Controller) Listen ¶
func (c *Controller) Listen(handle func(State))
Listen for controller state changes
type DPad ¶
type DPad struct {
X, Y int
}
DPad is the data structure describing the joysticks on the controller
type Motion ¶
type Motion struct {
X, Y, Z int16
}
Motion contains information about acceleration in x, y and z axis
type Orientation ¶
type Orientation struct {
Roll, Yaw, Pitch int16
}
Orientation describes roll, yaw and pith of the controller
Click to show internal directories.
Click to hide internal directories.