0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
*-------------------------------*
| Signature | Time |CNT|VER|
*-------------------------------*
|NUM|VER| Time | Yaw | Pitch |
| Roll | X | Y | Z | unused |
| JoyX | JoyY | BTNS | unused|
*-------------------------------*
|NUM|VER| Time | Yaw | Pitch |
| Roll | X | Y | Z | unused |
| JoyX | JoyY | BTNS | unused|
*-------------------------------*
|NUM|VER| Time | Yaw | Pitch |
| Roll | X | Y | Z | unused |
| JoyX | JoyY | BTNS | unused|
*-------------------------------*
| ... |
| |
*-------------------------------*
| checksum |
*-------------------------------*
- Common Header
- Signature(8bytes): magic signature of packet (
\x94BEP\x0D\x0A\x1A\x0A) - Time(4bytes): unsigned 32bit integer to represent millis after board started
- CNT(2bytes): number of connected controller
- VER(2bytes): version (
\x00\x01)
- Signature(8bytes): magic signature of packet (
- Body (sequence of connected controller)
- NUM(2bytes): current controller index (starting from 0)
- VER(2bytes): controller version (
\x00\x00) - Time(4bytes): unsigned 32bit integer to represent millis after controller started
- Yaw, Pitch, Roll(4bytes): 32bit float to represent rotation
- X, Y, Z(2bytes): 16bit signed int to represent world acceleration
- unused(6bytes): padding
- JoyX, Y(4bytes): 32bit integer to represent position of joystick (0~1024)
- BTNS(4bytes): button pressed information
- 1: up
- 2: down
- 4: right
- 8: left
- 16: JoyZ
- 32: unused
- 64: unused
- 128: unused
- unused: reversed for future
- checksum(16bytes): checksum of packet (TBD)