Documentation ¶
Index ¶
- Constants
- Variables
- func ControlCapabilities() []int
- func ControlFunctions() []int
- func DumpDevices() error
- type CommandID
- type ControlCapability
- type ControlFunction
- type ControlID
- type ControlInput
- type FunctionID
- type HowlerAccel
- type HowlerDevice
- func (howler *HowlerDevice) Close()
- func (howler *HowlerDevice) GetFWRelease() (HowlerFirmware, error)
- func (howler *HowlerDevice) GetInput(control ControlID) (HowlerInput, error)
- func (howler *HowlerDevice) GetLEDColor(led LedInputs) (HowlerLed, error)
- func (howler *HowlerDevice) Read() ([]byte, error)
- func (howler *HowlerDevice) ReadAccel() (HowlerAccel, error)
- func (howler *HowlerDevice) ResetToDefaults() (HowlerReset, error)
- func (howler *HowlerDevice) SetDefaultLEDColor(led LedInputs, value string) (HowlerLed, error)
- func (howler *HowlerDevice) SetJoystickAnalog(control ControlInput, function ControlFunction) (HowlerInput, error)
- func (howler *HowlerDevice) SetJoystickButton(control ControlInput, joystick ControlFunction, button JoystickButtons) (HowlerInput, error)
- func (howler *HowlerDevice) SetJoystickDigital(control ControlInput, function ControlFunction, value int8) (HowlerInput, error)
- func (howler *HowlerDevice) SetKeyboardButton(control ControlInput, key KeyCodes, modifier KeyModifiers) (HowlerInput, error)
- func (howler *HowlerDevice) SetLEDColor(led LedInputs, value string) error
- func (howler *HowlerDevice) SetMouseAxis(control ControlInput, function ControlFunction) (HowlerInput, error)
- func (howler *HowlerDevice) SetMouseButton(control ControlInput, button MouseButtons) (HowlerInput, error)
- func (howler *HowlerDevice) Write(data []byte) error
- func (howler *HowlerDevice) WriteWithResponse(input []byte) ([]byte, error)
- type HowlerFirmware
- type HowlerInput
- type HowlerLed
- type HowlerReset
- type JoystickButtons
- type KeyCodes
- type KeyModifiers
- type LedInputs
- type MouseButtons
Constants ¶
View Source
const (
HowlerID = 0xce
)
Variables ¶
View Source
var CapabilityNames = map[ControlCapability]string{ CapAccelerometer: "Accelerometer", CapJoystickAnalog: "JoystickAnalog", CapJoystickButton: "JoystickButton", CapJoystickDigital: "JoystickDigital", CapKeyboardButton: "KeyboardButton", CapMouseAxis: "MouseAxis", CapMouseButton: "MouseButton", }
View Source
var ControlButton1 = ControlInput{ // contains filtered or unexported fields }
Button Inputs
View Source
var ControlButton10 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton11 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton12 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton13 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton14 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton15 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton16 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton17 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton18 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton19 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton2 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton20 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton21 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton22 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton23 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton24 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton25 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton26 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton3 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton4 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton5 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton6 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton7 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton8 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlButton9 = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlFunctionMap = map[FunctionID]ControlFunction{ TypeJoystick1.id: TypeJoystick1, TypeJoystick2.id: TypeJoystick2, TypeKeyboard.id: TypeKeyboard, TypeMouse.id: TypeMouse, TypeMouseXAxis.id: TypeMouseXAxis, TypeMouseYAxis.id: TypeMouseYAxis, TypeMouseZAxis.id: TypeMouseZAxis, TypeJoy1_AnalogThrottle.id: TypeJoy1_AnalogThrottle, TypeJoy1_AnalogXaxis.id: TypeJoy1_AnalogXaxis, TypeJoy1_AnalogYaxis.id: TypeJoy1_AnalogYaxis, TypeJoy1_AnalogZaxis.id: TypeJoy1_AnalogZaxis, TypeJoy1_AnalogXrot.id: TypeJoy1_AnalogXrot, TypeJoy1_AnalogYrot.id: TypeJoy1_AnalogYrot, TypeJoy1_AnalogZrot.id: TypeJoy1_AnalogZrot, TypeJoy1_AnalogSlider.id: TypeJoy1_AnalogSlider, TypeJoy2_AnalogThrottle.id: TypeJoy2_AnalogThrottle, TypeJoy2_AnalogXaxis.id: TypeJoy2_AnalogXaxis, TypeJoy2_AnalogYaxis.id: TypeJoy2_AnalogYaxis, TypeJoy2_AnalogZaxis.id: TypeJoy2_AnalogZaxis, TypeJoy2_AnalogXrot.id: TypeJoy2_AnalogXrot, TypeJoy2_AnalogYrot.id: TypeJoy2_AnalogYrot, TypeJoy2_AnalogZrot.id: TypeJoy2_AnalogZrot, TypeJoy2_AnalogSlider.id: TypeJoy2_AnalogSlider, TypeJoy1_DigitalThrottle.id: TypeJoy1_DigitalThrottle, TypeJoy1_DigitalXaxis.id: TypeJoy1_DigitalXaxis, TypeJoy1_DigitalYaxis.id: TypeJoy1_DigitalYaxis, TypeJoy1_DigitalZaxis.id: TypeJoy1_DigitalZaxis, TypeJoy1_DigitalXrot.id: TypeJoy1_DigitalXrot, TypeJoy1_DigitalYrot.id: TypeJoy1_DigitalYrot, TypeJoy1_DigitalZrot.id: TypeJoy1_DigitalZrot, TypeJoy1_DigitalSlider.id: TypeJoy1_DigitalSlider, TypeJoy2_DigitalThrottle.id: TypeJoy2_DigitalThrottle, TypeJoy2_DigitalXaxis.id: TypeJoy2_DigitalXaxis, TypeJoy2_DigitalYaxis.id: TypeJoy2_DigitalYaxis, TypeJoy2_DigitalZaxis.id: TypeJoy2_DigitalZaxis, TypeJoy2_DigitalXrot.id: TypeJoy2_DigitalXrot, TypeJoy2_DigitalYrot.id: TypeJoy2_DigitalYrot, TypeJoy2_DigitalZrot.id: TypeJoy2_DigitalZrot, TypeJoy2_DigitalSlider.id: TypeJoy2_DigitalSlider, }
View Source
var ControlInputMap = map[ControlID]ControlInput{ ControlJoy1Up.id: ControlJoy1Up, ControlJoy1Down.id: ControlJoy1Down, ControlJoy1Left.id: ControlJoy1Left, ControlJoy1Right.id: ControlJoy1Right, ControlJoy2Up.id: ControlJoy2Up, ControlJoy2Down.id: ControlJoy2Down, ControlJoy2Left.id: ControlJoy2Left, ControlJoy2Right.id: ControlJoy2Right, ControlJoy3Up.id: ControlJoy3Up, ControlJoy3Down.id: ControlJoy3Down, ControlJoy3Left.id: ControlJoy3Left, ControlJoy3Right.id: ControlJoy3Right, ControlJoy4Up.id: ControlJoy4Up, ControlJoy4Down.id: ControlJoy4Down, ControlJoy4Left.id: ControlJoy4Left, ControlJoy4Right.id: ControlJoy4Right, ControlButton1.id: ControlButton1, ControlButton2.id: ControlButton2, ControlButton3.id: ControlButton3, ControlButton4.id: ControlButton4, ControlButton5.id: ControlButton5, ControlButton6.id: ControlButton6, ControlButton7.id: ControlButton7, ControlButton8.id: ControlButton8, ControlButton9.id: ControlButton9, ControlButton10.id: ControlButton10, ControlButton11.id: ControlButton11, ControlButton12.id: ControlButton12, ControlButton13.id: ControlButton13, ControlButton14.id: ControlButton14, ControlButton15.id: ControlButton15, ControlButton16.id: ControlButton16, ControlButton17.id: ControlButton17, ControlButton18.id: ControlButton18, ControlButton19.id: ControlButton19, ControlButton20.id: ControlButton20, ControlButton21.id: ControlButton21, ControlButton22.id: ControlButton22, ControlButton23.id: ControlButton23, ControlButton24.id: ControlButton24, ControlButton25.id: ControlButton25, ControlButton26.id: ControlButton26, ControlXAxis.id: ControlXAxis, ControlYAxis.id: ControlYAxis, ControlZAxis.id: ControlZAxis, }
View Source
var ControlJoy1Down = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy1Left = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy1Right = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy1Up = ControlInput{ // contains filtered or unexported fields }
Joystick Inputs
View Source
var ControlJoy2Down = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy2Left = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy2Right = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy2Up = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy3Down = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy3Left = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy3Right = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy3Up = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy4Down = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy4Left = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy4Right = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlJoy4Up = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlXAxis = ControlInput{ // contains filtered or unexported fields }
Axis Inputs
View Source
var ControlYAxis = ControlInput{ // contains filtered or unexported fields }
View Source
var ControlZAxis = ControlInput{ // contains filtered or unexported fields }
View Source
var JoystickButtonNames = map[JoystickButtons]string{ JoyButton1: "Button1", JoyButton2: "Button2", JoyButton3: "Button3", JoyButton4: "Button4", JoyButton5: "Button5", JoyButton6: "Button6", JoyButton7: "Button7", JoyButton8: "Button8", JoyButton9: "Button9", JoyButton10: "Button10", JoyButton11: "Button11", JoyButton12: "Button12", JoyButton13: "Button13", JoyButton14: "Button14", JoyButton15: "Button15", JoyButton16: "Button16", JoyButton17: "Button17", JoyButton18: "Button18", JoyButton19: "Button19", JoyButton20: "Button20", JoyButton21: "Button21", JoyButton22: "Button22", JoyButton23: "Button23", JoyButton24: "Button24", JoyButton25: "Button25", JoyButton26: "Button26", JoyButton27: "Button27", JoyButton28: "Button28", JoyButton29: "Button29", JoyButton30: "Button30", JoyButton31: "Button31", JoyButton32: "Button32", }
View Source
var KeyNames = map[KeyCodes]string{ KeyA: "A", KeyB: "B", KeyC: "C", KeyD: "D", KeyE: "E", KeyF: "F", KeyG: "G", KeyH: "H", KeyI: "I", KeyJ: "J", KeyK: "K", KeyL: "L", KeyM: "M", KeyN: "N", KeyO: "O", KeyP: "P", KeyQ: "Q", KeyR: "R", KeyS: "S", KeyT: "T", KeyU: "U", KeyV: "V", KeyW: "W", KeyX: "X", KeyY: "Y", KeyZ: "Z", Key1: "1", Key2: "2", Key3: "3", Key4: "4", Key5: "5", Key6: "6", Key7: "7", Key8: "8", Key9: "9", Key0: "0", KeyEnter: "Enter", KeyEscape: "Escape", KeyBackspace: "Backspace", KeyTab: "Tab", KeySpace: "Space", KeyMinus: "Minus", KeyEqual: "Equal", KeyLeftBracket: "LeftBracket", KeyRightBracket: "RightBracket", KeyBackSlash: "BackSlash", KeyColon: "Colon", KeyApostrophe: "Apostrophe", KeyTilde: "Tilde", KeyComma: "Comma", KeyPeriod: "Period", KeySlash: "Slash", KeyCapsLock: "CapsLock", KeyF1: "F1", KeyF2: "F2", KeyF3: "F3", KeyF4: "F4", KeyF5: "F5", KeyF6: "F6", KeyF7: "F7", KeyF8: "F8", KeyF9: "F9", KeyF10: "F10", KeyF11: "F11", KeyF12: "F12", KeyPrintScreen: "PrintScreen", KeyScrollLock: "ScrollLock", KeyPause: "Pause", KeyInsert: "Insert", KeyHome: "Home", KeyPageUp: "PageUp", KeyDelete: "Delete", KeyEnd: "End", KeyPageDown: "PageDown", KeyRight: "Right", KeyLeft: "Left", KeyDown: "Down", KeyUp: "Up", KeyNumLock: "NumLock", KeyKpSlash: "KpSlash", KeyKpAsterisk: "KpAsterisk", KeyKpMinus: "KpMinus", KeyKpPlus: "KpPlus", KeyKpEnter: "KpEnter", KeyKp1: "Kp1", KeyKp2: "Kp2", KeyKp3: "Kp3", KeyKp4: "Kp4", KeyKp5: "Kp5", KeyKp6: "Kp6", KeyKp7: "Kp7", KeyKp8: "Kp8", KeyKp9: "Kp9", KeyKp0: "Kp0", }
View Source
var LedInputNames = map[LedInputs]string{ LedJoy1: "Joy1", LedJoy2: "Joy2", LedJoy3: "Joy3", LedJoy4: "Joy4", LedButton1: "Button1", LedButton2: "Button2", LedButton3: "Button3", LedButton4: "Button4", LedButton5: "Button5", LedButton6: "Button6", LedButton7: "Button7", LedButton8: "Button8", LedButton9: "Button9", LedButton10: "Button10", LedButton11: "Button11", LedButton12: "Button12", LedButton13: "Button13", LedButton14: "Button14", LedButton15: "Button15", LedButton16: "Button16", LedButton17: "Button17", LedButton18: "Button18", LedButton19: "Button19", LedButton20: "Button20", LedButton21: "Button21", LedButton22: "Button22", LedButton23: "Button23", LedButton24: "Button24", LedButton25: "Button25", LedButton26: "Button26", LedHP1: "HP1", LedHP2: "HP2", }
View Source
var ModifierNames = map[KeyModifiers]string{ ModifierNone: "None", ModifierLeftControl: "Left-Control", ModifierLeftShift: "Left-Shift", ModifierLeftAlt: "Left-Alt", ModifierLeftUI: "Left-UI", ModifierRightControl: "Right-Control", ModifierRightShift: "Right-Shift", ModifierRightAlt: "Right-Alt", ModifierRightUI: "Right-UI", }
View Source
var MouseButtonNames = map[MouseButtons]string{ MouseLeft: "Left", MouseRight: "Right", MouseMiddle: "Middle", }
View Source
var TypeJoy1_AnalogOffset = ControlFunction{ // contains filtered or unexported fields }
Analog joystick 1
View Source
var TypeJoy1_AnalogSlider = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_AnalogThrottle = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_AnalogXaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_AnalogXrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_AnalogYaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_AnalogYrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_AnalogZaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_AnalogZrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalOffset = ControlFunction{ // contains filtered or unexported fields }
Digital joystick 1
View Source
var TypeJoy1_DigitalSlider = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalThrottle = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalXaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalXrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalYaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalYrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalZaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy1_DigitalZrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogOffset = ControlFunction{ // contains filtered or unexported fields }
Analog joystick 2
View Source
var TypeJoy2_AnalogSlider = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogThrottle = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogXaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogXrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogYaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogYrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogZaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_AnalogZrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalOffset = ControlFunction{ // contains filtered or unexported fields }
Digital joystick 2
View Source
var TypeJoy2_DigitalSlider = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalThrottle = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalXaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalXrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalYaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalYrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalZaxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoy2_DigitalZrot = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeJoystick1 = ControlFunction{ // contains filtered or unexported fields }
Buttons
View Source
var TypeJoystick2 = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeKeyboard = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeMouse = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeMouseXAxis = ControlFunction{ // contains filtered or unexported fields }
Mouse Axis
View Source
var TypeMouseYAxis = ControlFunction{ // contains filtered or unexported fields }
View Source
var TypeMouseZAxis = ControlFunction{ // contains filtered or unexported fields }
Functions ¶
func ControlCapabilities ¶
func ControlCapabilities() []int
func ControlFunctions ¶
func ControlFunctions() []int
func DumpDevices ¶
func DumpDevices() error
Types ¶
type CommandID ¶
type CommandID byte
const ( CommandSetLedRGB CommandID = 0x01 CommandSetIndividualLed CommandID = 0x02 CommandSetInput CommandID = 0x03 CommandGetInput CommandID = 0x04 CommandSetDefault CommandID = 0x05 CommandSetGlobalBrightness CommandID = 0x06 CommandSetRGBLedDefault CommandID = 0x07 CommandGetRGBLed CommandID = 0x08 CommandGetRGBLedBank CommandID = 0x09 CommandGetFirmwareRev CommandID = 0xa0 CommandSetDeviceID CommandID = 0xb0 CommandGetQEC CommandID = 0xdd CommandGetAccelData CommandID = 0xac CommandGetADCS CommandID = 0xad )
type ControlCapability ¶
type ControlCapability int
const ( CapNone ControlCapability = 0 CapAccelerometer ControlCapability = 1 << (iota - 1) CapJoystickAnalog CapJoystickButton CapJoystickDigital CapKeyboardButton CapMouseAxis CapMouseButton )
func (ControlCapability) String ¶
func (capability ControlCapability) String() string
type ControlFunction ¶
type ControlFunction struct {
// contains filtered or unexported fields
}
func ControlFunctionsByID ¶
func ControlFunctionsByID() []ControlFunction
func ControlFunctionsByName ¶
func ControlFunctionsByName() []ControlFunction
func IDToFunction ¶
func IDToFunction(id FunctionID) (ControlFunction, error)
func StringToControlFunction ¶
func StringToControlFunction(typ string) (ControlFunction, error)
func (ControlFunction) Capability ¶
func (typ ControlFunction) Capability() ControlCapability
func (ControlFunction) ID ¶
func (typ ControlFunction) ID() FunctionID
func (ControlFunction) Name ¶
func (typ ControlFunction) Name() string
type ControlInput ¶
type ControlInput struct {
// contains filtered or unexported fields
}
func ControlInputsByID ¶
func ControlInputsByID() []ControlInput
func ControlInputsByName ¶
func ControlInputsByName() []ControlInput
func IDToControl ¶
func IDToControl(id ControlID) (ControlInput, error)
func StringToControl ¶
func StringToControl(control string) (ControlInput, error)
func (ControlInput) Capability ¶
func (control ControlInput) Capability() ControlCapability
func (ControlInput) ID ¶
func (control ControlInput) ID() ControlID
func (ControlInput) Name ¶
func (control ControlInput) Name() string
func (ControlInput) Type ¶
func (control ControlInput) Type() string
type FunctionID ¶
type FunctionID int
type HowlerAccel ¶
func (*HowlerAccel) Dump ¶
func (accel *HowlerAccel) Dump()
func (*HowlerAccel) String ¶
func (accel *HowlerAccel) String() string
type HowlerDevice ¶
type HowlerDevice struct {
// contains filtered or unexported fields
}
func OpenDevice ¶
func OpenDevice(device int) (*HowlerDevice, error)
func (*HowlerDevice) Close ¶
func (howler *HowlerDevice) Close()
func (*HowlerDevice) GetFWRelease ¶
func (howler *HowlerDevice) GetFWRelease() (HowlerFirmware, error)
func (*HowlerDevice) GetInput ¶
func (howler *HowlerDevice) GetInput(control ControlID) (HowlerInput, error)
func (*HowlerDevice) GetLEDColor ¶
func (howler *HowlerDevice) GetLEDColor(led LedInputs) (HowlerLed, error)
func (*HowlerDevice) Read ¶
func (howler *HowlerDevice) Read() ([]byte, error)
func (*HowlerDevice) ReadAccel ¶
func (howler *HowlerDevice) ReadAccel() (HowlerAccel, error)
func (*HowlerDevice) ResetToDefaults ¶
func (howler *HowlerDevice) ResetToDefaults() (HowlerReset, error)
func (*HowlerDevice) SetDefaultLEDColor ¶
func (howler *HowlerDevice) SetDefaultLEDColor(led LedInputs, value string) (HowlerLed, error)
func (*HowlerDevice) SetJoystickAnalog ¶
func (howler *HowlerDevice) SetJoystickAnalog(control ControlInput, function ControlFunction) (HowlerInput, error)
func (*HowlerDevice) SetJoystickButton ¶
func (howler *HowlerDevice) SetJoystickButton(control ControlInput, joystick ControlFunction, button JoystickButtons) (HowlerInput, error)
func (*HowlerDevice) SetJoystickDigital ¶
func (howler *HowlerDevice) SetJoystickDigital(control ControlInput, function ControlFunction, value int8) (HowlerInput, error)
func (*HowlerDevice) SetKeyboardButton ¶
func (howler *HowlerDevice) SetKeyboardButton(control ControlInput, key KeyCodes, modifier KeyModifiers) (HowlerInput, error)
func (*HowlerDevice) SetLEDColor ¶
func (howler *HowlerDevice) SetLEDColor(led LedInputs, value string) error
func (*HowlerDevice) SetMouseAxis ¶
func (howler *HowlerDevice) SetMouseAxis(control ControlInput, function ControlFunction) (HowlerInput, error)
func (*HowlerDevice) SetMouseButton ¶
func (howler *HowlerDevice) SetMouseButton(control ControlInput, button MouseButtons) (HowlerInput, error)
func (*HowlerDevice) Write ¶
func (howler *HowlerDevice) Write(data []byte) error
func (*HowlerDevice) WriteWithResponse ¶
func (howler *HowlerDevice) WriteWithResponse(input []byte) ([]byte, error)
type HowlerFirmware ¶
type HowlerFirmware struct {
Major, Minor int
// contains filtered or unexported fields
}
func (*HowlerFirmware) Dump ¶
func (accel *HowlerFirmware) Dump()
type HowlerInput ¶
type HowlerInput struct { ControlID ControlID FunctionID FunctionID InputValue1 int InputValue2 int InputAccelMin int InputAccelMax int ControlSet int // contains filtered or unexported fields }
func (*HowlerInput) Control ¶
func (input *HowlerInput) Control() (ControlInput, error)
func (*HowlerInput) Dump ¶
func (input *HowlerInput) Dump() string
func (*HowlerInput) Function ¶
func (input *HowlerInput) Function() (ControlFunction, error)
func (*HowlerInput) String ¶
func (input *HowlerInput) String() string
type HowlerLed ¶
type HowlerLed struct {
Red, Green, Blue int
// contains filtered or unexported fields
}
func (*HowlerLed) ToHexString ¶
func (*HowlerLed) ToIntString ¶
type HowlerReset ¶
type HowlerReset struct { Response int // contains filtered or unexported fields }
func (*HowlerReset) Dump ¶
func (input *HowlerReset) Dump()
type JoystickButtons ¶
type JoystickButtons int
const ( JoyMin JoystickButtons = 0 JoyButton1 JoystickButtons = iota JoyButton2 JoyButton3 JoyButton4 JoyButton5 JoyButton6 JoyButton7 JoyButton8 JoyButton9 JoyButton10 JoyButton11 JoyButton12 JoyButton13 JoyButton14 JoyButton15 JoyButton16 JoyButton17 JoyButton18 JoyButton19 JoyButton20 JoyButton21 JoyButton22 JoyButton23 JoyButton24 JoyButton25 JoyButton26 JoyButton27 JoyButton28 JoyButton29 JoyButton30 JoyButton31 JoyButton32 JoyMax )
func ToJoystickButton ¶
func ToJoystickButton(button string) JoystickButtons
func (JoystickButtons) String ¶
func (joy JoystickButtons) String() string
type KeyCodes ¶
type KeyCodes int
const ( KeyNone KeyCodes = 0 KeyMin KeyCodes = 4 KeyA KeyCodes = 2 + iota // 4 (0x04) KeyB // 5 (0x05) KeyC // 6 (0x06) KeyD // 7 (0x07) KeyE // 8 (0x08) KeyF // 9 (0x09) KeyG // 10 (0x0a) KeyH // 11 (0x0b) KeyI // 12 (0x0c) KeyJ // 13 (0x0d) KeyK // 14 (0x0e) KeyL // 15 (0x0f) KeyM // 16 (0x10) KeyN // 17 (0x11) KeyO // 18 (0x12) KeyP // 19 (0x13) KeyQ // 20 (0x14) KeyR // 21 (0x15) KeyS // 22 (0x16) KeyT // 23 (0x17) KeyU // 24 (0x18) KeyV // 25 (0x19) KeyW // 26 (0x1a) KeyX // 27 (0x1b) KeyY // 28 (0x1c) KeyZ // 29 (0x1d) Key1 // 30 (0x1e) Key2 // 31 (0x1f) Key3 // 32 (0x20) Key4 // 33 (0x21) Key5 // 34 (0x22) Key6 // 35 (0x23) Key7 // 36 (0x24) Key8 // 37 (0x25) Key9 // 38 (0x26) Key0 // 39 (0x27) KeyEnter // 40 (0x28) KeyEscape // 41 (0x29) KeyBackspace // 42 (0x2a) KeyTab // 43 (0x2b) KeySpace // 44 (0x2c) KeyMinus // 45 (0x2d) KeyEqual // 46 (0x2e) KeyLeftBracket // 47 (0x2f) KeyRightBracket // 48 (0x30) KeyBackSlash // 49 (0x31) KeyColon // 51 (0x33) KeyApostrophe // 52 (0x34) KeyTilde // 53 (0x35) KeyComma // 54 (0x36) KeyPeriod // 55 (0x37) KeySlash // 56 (0x38) KeyCapsLock // 57 (0x39) KeyF1 // 58 (0x3a) KeyF2 // 59 (0x3b) KeyF3 // 60 (0x3c) KeyF4 // 61 (0x3d) KeyF5 // 62 (0x3e) KeyF6 // 63 (0x3f) KeyF7 // 64 (0x40) KeyF8 // 65 (0x41) KeyF9 // 66 (0x42) KeyF10 // 67 (0x43) KeyF11 // 68 (0x44) KeyF12 // 69 (0x45) KeyPrintScreen // 70 (0x46) KeyScrollLock // 71 (0x47) KeyPause // 72 (0x48) KeyInsert // 73 (0x49) KeyHome // 74 (0x4a) KeyPageUp // 75 (0x4b) KeyDelete // 76 (0x4c) KeyEnd // 77 (0x4d) KeyPageDown // 78 (0x4e) KeyRight // 79 (0x4f) KeyLeft // 80 (0x50) KeyDown // 81 (0x51) KeyUp // 82 (0x52) KeyNumLock // 83 (0x53) KeyKpSlash // 84 (0x54) KeyKpAsterisk // 85 (0x55) KeyKpMinus // 86 (0x56) KeyKpPlus // 87 (0x57) KeyKpEnter // 88 (0x58) KeyKp1 // 89 (0x59) KeyKp2 // 90 (0x5a) KeyKp3 // 91 (0x5b) KeyKp4 // 92 (0x5c) KeyKp5 // 93 (0x5d) KeyKp6 // 94 (0x5e) KeyKp7 // 95 (0x5f) KeyKp8 // 96 (0x60) KeyKp9 // 97 (0x61) KeyKp0 // 98 (0x62) KeyMax KeyGrave KeyCodes = KeyTilde KeyDot KeyCodes = KeyPeriod KeyForwardSlash KeyCodes = KeySlash KeyDash KeyCodes = KeyMinus KeyKpDash KeyCodes = KeyKpMinus )
type KeyModifiers ¶
type KeyModifiers int
const ( ModifierNone KeyModifiers = 0 // 0x00 ModifierLeftControl KeyModifiers = 1 << (iota - 1) // 0x01 ModifierLeftShift // 0x02 ModifierLeftAlt // 0x04 ModifierLeftUI // 0x08 ModifierRightControl // 0x10 ModifierRightShift // 0x20 ModifierRightAlt // 0x40 ModifierRightUI // 0x80 )
func ToModifier ¶
func ToModifier(modifier string) KeyModifiers
func (KeyModifiers) String ¶
func (mod KeyModifiers) String() string
type LedInputs ¶
type LedInputs int
const ( LedMin LedInputs = 0 LedJoy1 LedInputs = (iota - 1) // 0 (0x00) LedJoy2 // 1 (0x01) LedJoy3 // 2 (0x02) LedJoy4 // 3 (0x03) LedButton1 // 4 (0x04) LedButton2 // 5 (0x05) LedButton3 // 6 (0x06) LedButton4 // 7 (0x07) LedButton5 // 8 (0x08) LedButton6 // 9 (0x09) LedButton7 // 10 (0x0a) LedButton8 // 11 (0x0b) LedButton9 // 12 (0x0c) LedButton10 // 13 (0x0d) LedButton11 // 14 (0x0e) LedButton12 // 15 (0x0f) LedButton13 // 16 (0x10) LedButton14 // 17 (0x11) LedButton15 // 18 (0x12) LedButton16 // 19 (0x13) LedButton17 // 20 (0x14) LedButton18 // 21 (0x15) LedButton19 // 22 (0x16) LedButton20 // 23 (0x17) LedButton21 // 24 (0x18) LedButton22 // 25 (0x19) LedButton23 // 26 (0x1a) LedButton24 // 27 (0x1b) LedButton25 // 28 (0x1c) LedButton26 // 29 (0x1d) LedHP1 // 30 (0x1e) LedHP2 // 31 (0x1f) LedMax )
type MouseButtons ¶
type MouseButtons int
const ( MouseMin MouseButtons = iota MouseLeft // 1 (0x01) MouseRight // 2 (0x02) MouseMiddle // 3 (0x03) MouseMax )
func ToMouseButton ¶
func ToMouseButton(button string) MouseButtons
func (MouseButtons) String ¶
func (button MouseButtons) String() string
Source Files ¶
- control-capabilities.go
- control-functions.go
- control-inputs.go
- firmware.go
- howler-commands.go
- howler.go
- input-joystick-analog.go
- input-joystick-button.go
- input-joystick-digital.go
- input-keyboard-button.go
- input-mouse-axis.go
- input-mouse-button.go
- input-reset.go
- input.go
- joystick-buttons.go
- keyboard-keycodes.go
- keyboard-modifiers.go
- led-inputs.go
- led.go
- mouse-buttons.go
- read-accel.go
Click to show internal directories.
Click to hide internal directories.