summaryrefslogtreecommitdiff
path: root/m4p/m4p.go
blob: d69e31b518664c0b95caaf83a49f71e184e4f6b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package m4p

import "time"

// Protocol constants.
const (
	protocolVersion         = 1
	keepaliveTimeout        = 3 * time.Second
	clientKeepaliveInterval = 2 * time.Second
)

// Magic remote keycodes.
const (
	KeyWheelPressed = 13
	KeyPause        = 19
	KeyChannelUp    = 33
	KeyChannelDown  = 34
	KeyLeft         = 37
	KeyUp           = 38
	KeyRight        = 39
	KeyDown         = 40
	Key0            = 48
	Key1            = 49
	Key2            = 50
	Key3            = 51
	Key4            = 52
	Key5            = 53
	Key6            = 54
	Key7            = 55
	Key8            = 56
	Key9            = 57
	KeyRed          = 403
	KeyGreen        = 404
	KeyYellow       = 405
	KeyBlue         = 406
	KeyPlay         = 415
	KeyBack         = 461
)

// DefaultFilters used for remote updates.
var DefaultFilters = []string{
	"returnValue",
	"deviceId",
	"coordinate",
	"gyroscope",
	"acceleration",
	"quaternion",
}