drumpacket

package
v0.0.0-...-dd0bef4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedDrum = 0x20

	YellowDrum1 = 0x1
	YellowDrum2 = 0x2
	YellowDrum3 = 0x3
	YellowDrum4 = 0x4
	YellowDrum5 = 0x5
	YellowDrum6 = 0x6
	YellowDrum7 = 0x7

	BlueDrum10 = 0x10
	BlueDrum20 = 0x20
	BlueDrum30 = 0x30
	BlueDrum40 = 0x40
	BlueDrum50 = 0x50
	BlueDrum60 = 0x60

	GreenDrum = 0x10
	BassOne   = 0x10
	BassTwo   = 0x20
)

Drums

View Source
const (
	YellowCymbal10 = 0x10
	YellowCymbal20 = 0x20
	YellowCymbal30 = 0x30
	YellowCymbal40 = 0x40
	YellowCymbal50 = 0x50
	YellowCymbal60 = 0x60
	YellowCymbal70 = 0x70

	BlueCymbal1 = 0x1
	BlueCymbal2 = 0x2
	BlueCymbal3 = 0x3
	BlueCymbal4 = 0x4
	BlueCymbal5 = 0x5
	BlueCymbal6 = 0x6
	BlueCymbal7 = 0x7

	GreenCymbal10 = 0x10
	GreenCymbal20 = 0x20
	GreenCymbal30 = 0x30
	GreenCymbal40 = 0x40
	GreenCymbal50 = 0x50
	GreenCymbal60 = 0x60
	GreenCymbal70 = 0x70
)

Cymbals

View Source
const (
	ButtonXbox    = 0x1
	ButtonMenu    = 0x4
	ButtonOptions = 0x8
)

Buttons

View Source
const (
	DpadDown  = 0x1
	DpadUp    = 0x2
	DpadLeft  = 0x4
	DpadRight = 0x8
)
View Source
const (
	PosRedDrum      = 8
	PosYellowDrum   = 10
	PosBlueDrum     = 11
	PosGreenDrum    = 8
	PosBassPedal    = 9
	PosYellowCymbal = 12
	PosBlueCymbal   = 12
	PosGreenCymbal  = 13

	PosButtons = 8
	PosDpad    = 9
)

Packet Pieces

View Source
const XboxHeaderLength = 22

Variables

This section is empty.

Functions

This section is empty.

Types

type Buttons

type Buttons struct {
	Menu, Options, Xbox bool
}

type Cymbals

type Cymbals struct {
	Yellow, Blue, Green bool
}

type Dpad

type Dpad struct {
	Up, Down, Left, Right bool
}

type DrumPacket

type DrumPacket struct {
	Drums   Drums
	Cymbals Cymbals
	Dpad    Dpad
	Buttons Buttons
}

func CreateDrumPacket

func CreateDrumPacket(packet []byte) DrumPacket

CreateDrumPacket returns a DrumPacket struct filled with the values of the given packet

Note: the function assumes that the given packet has already had the XboxHeader removed from it

type Drums

type Drums struct {
	Red, Yellow, Blue, Green, BassOne, BassTwo bool
}

Jump to

Keyboard shortcuts

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