-
-
Save nikitalita/4e777441f0a9a5a76c94cec5bd70633b to your computer and use it in GitHub Desktop.
steamdevicereport.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Steam device's connection state. | |
*/ | |
export const enum SteamDeviceState { | |
Disconnected = 0x00, | |
Pairing = 0x01, | |
Connected = 0x02, | |
} | |
/** | |
* Steam device report interface. | |
*/ | |
export interface SteamDeviceReport extends MotionDataWithQuaternion { | |
packetCounter: number; | |
battery: number; | |
timestamp: number; | |
macAddress: string; | |
state: SteamDeviceState; | |
button: { | |
RT: boolean, | |
LT: boolean, | |
RS: boolean, | |
LS: boolean, | |
Y: boolean, | |
B: boolean, | |
X: boolean, | |
A: boolean, | |
previous: boolean, | |
steam: boolean, | |
next: boolean, | |
dPad: { | |
UP: boolean, | |
RIGHT: boolean, | |
LEFT: boolean, | |
DOWN: boolean, | |
}, | |
grip: { | |
LEFT: boolean, | |
RIGHT: boolean, | |
}, | |
stick: boolean, | |
rightPad: boolean, | |
}; | |
touch: { | |
leftPad: boolean, | |
rightPad: boolean, | |
}; | |
trigger: { | |
LEFT: number, | |
RIGHT: number, | |
}; | |
position: { | |
stick: { x: number, y: number }, | |
leftPad: { x: number, y: number }, | |
rightPad: { x: number, y: number }, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment