-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
23 lines (22 loc) · 695 Bytes
/
types.ts
File metadata and controls
23 lines (22 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export enum CLIENT_TYPE {
REMOTE_CONTROL = "REMOTE_CONTROL", // Sends operator commands to car
COCKPIT = "COCKPIT", // shows camera image, car speed and similar properties
CAMERA = "CAMERA", // is a camera
GPIO_VIEWER = "GPIO_VIEWER", // shows pin values of GPIO
ACCELEROMETER = "ACCELEROMETER", // Sends data on the acceleration of the car
}
export type ThreeDeeCoords = { x: number; y: number; z: number }
export type MotorInfo = { throttle: number }
export type CarInfo = {
orientation: number
leftMotor: MotorInfo
rightMotor: MotorInfo
posX: number
posY: number
speed: number
mpu: {
accel: ThreeDeeCoords
gyro: ThreeDeeCoords
speed: ThreeDeeCoords
}
}