forked from aeroniemi/xled-js
-
Notifications
You must be signed in to change notification settings - Fork 2
/
interfaces.ts
58 lines (54 loc) · 1.18 KB
/
interfaces.ts
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
49
50
51
52
53
54
55
56
57
export interface rgbColor {
/** Red 0..255 */
red: number;
/** Green 0..255 */
green: number;
/** Blue 0..255 */
blue: number;
}
export interface hsvColor {
/** Hue 0..359 */
hue: number;
/** Saturation 0..255 */
saturation: number;
/** Value (brightness) 0..255 */
value: number;
}
export enum deviceMode {
demo = "demo",
color = "color",
off = "off",
effect = "effect",
movie = "movie",
playlist = "playlist",
rt = "rt",
}
export enum applicationResponseCode {
Ok = 1000,
error = 1001,
invalidArgumentValue = 1101,
valueTooLong = 1102,
malformedJSON = 1104,
invalidArgumentKey = 1105,
firmwareUpgradeSHA1SUMerror = 1205,
}
export interface timer {
/** Current time according to the device, seconds after midnight */
time_now: number;
/** Time to switch lights on, seconds after midnight. -1 if not set. */
time_on: number;
/** Time to switch lights off, seconds after midnight. -1 if not set. */
time_off: number;
}
export interface coordinate {
x: number;
y: number;
z: number;
}
export interface layout {
source: string;
synthesized: boolean;
uuid: string;
coordinates: coordinate[];
code: applicationResponseCode;
}