Documentation
¶
Index ¶
- Constants
- func Search(dts ...DeviceType) ([]*hid.DeviceInfo, error)
- type CalibInfo
- type DeviceType
- type IRData
- type Joycon
- func (jc *Joycon) Close()
- func (jc *Joycon) IRData() <-chan IRData
- func (jc *Joycon) IsLeft() bool
- func (jc *Joycon) IsProCon() bool
- func (jc *Joycon) IsRight() bool
- func (jc *Joycon) LeftStickCalibration() CalibInfo
- func (jc *Joycon) Name() string
- func (jc *Joycon) ReadSPI(addr uint16, length int) ([]byte, error)
- func (jc *Joycon) RightStickCalibration() CalibInfo
- func (jc *Joycon) SendRumble(rs ...RumbleSet) error
- func (jc *Joycon) Sensor() <-chan Sensor
- func (jc *Joycon) State() <-chan State
- func (jc *Joycon) Stats() Stats
- func (jc *Joycon) Subcommand(b []byte) ([]byte, error)
- type Rumble
- type RumbleSet
- type Sensor
- type Sensors
- type State
- type Stats
- type Stick
- type Vec2
- type Vec3
Constants ¶
View Source
const ( GyroRange = 16000 SensorRes = 65535 GyroGain = 4000 //AccelK = GyroRange / SensorRes / 1000 AccelK = 1.0 / 4096 //GyroK = GyroGain / SensorRes GyroK = 1.0 / 4096 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeviceType ¶
type DeviceType int
const ( JoyConL DeviceType = 0x2006 JoyConR DeviceType = 0x2007 ProCon DeviceType = 0x2009 )
type IRData ¶
type IRData struct { }
IRData ...
func (*IRData) UnmarshalBinary ¶
UnmarshalBinary ...
type Joycon ¶
type Joycon struct {
// contains filtered or unexported fields
}
Joycon ...
func (*Joycon) LeftStickCalibration ¶
LeftStickCalibration ...
func (*Joycon) RightStickCalibration ¶
RightStickCalibration ...
type Rumble ¶
type Rumble struct { HiFreq uint8 // 7bits normal 64 HiAmp uint8 // 7bits normal 0 LoFreq uint8 // 7bits normal 64 LoAmp uint8 // 7bits normal 0 }
Rumble ...
type RumbleSet ¶
type RumbleSet [2]Rumble
RumbleSet ...
func (RumbleSet) MarshalBinary ¶
MarshalBinary ...
type Sensors ¶
type Sensors [3]Sensor
Sensors ...
func (*Sensors) UnmarshalBinary ¶
UnmarshalBinary ...
type State ¶
type State struct { Tick byte Battery int Buttons uint32 Left Stick Right Stick LeftAdj Vec2 RightAdj Vec2 Err error }
State ...
Click to show internal directories.
Click to hide internal directories.