diff options
author | Mathias Fredriksson <mafredri@gmail.com> | 2022-02-07 20:50:53 +0200 |
---|---|---|
committer | Mathias Fredriksson <mafredri@gmail.com> | 2022-02-07 20:54:51 +0200 |
commit | 6436c86e0c53d9fbd83d883f76cbd8a267b6428e (patch) | |
tree | 07f90e739d93b44a7247cfb84cabba7891389e31 /m4p/m4p.go | |
parent | ac3aa7fb134166afb5e159786db501e1e6b646fa (diff) |
Implement initial PoC for Kodi
Diffstat (limited to 'm4p/m4p.go')
-rw-r--r-- | m4p/m4p.go | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/m4p/m4p.go b/m4p/m4p.go new file mode 100644 index 0000000..07f78a5 --- /dev/null +++ b/m4p/m4p.go @@ -0,0 +1,46 @@ +package m4p + +import "time" + +// Protocol constants. +const ( + protocolVersion = 1 + keepaliveTimeout = 3 * time.Second + clientKeepaliveInterval = 2 * time.Second +) + +// Magic remote keycodes. +const ( + KeyWheelPressed = 13 + 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 + KeyBack = 461 +) + +// DefaultFilters used for remote updates. +var DefaultFilters = []string{ + "returnValue", + "deviceId", + "coordinate", + "gyroscope", + "acceleration", + "quaternion", +} |