-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlogic.txt
31 lines (15 loc) · 1.28 KB
/
logic.txt
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
When starting up, we get the list of workspaces and connect to the first one.
If we receive a disconnect on that workspace, we query the list of workspaces and pick the first one again.
If we receive an empty list of workspaces, we query again in 2 seconds.
When connecting to a workspace, we query for all cues.
When we receive all cues, query the position for all cues on the first cart wall.
Also count how many of those cues/queries we sent out.
As we receive cue positions, we store them in a map.
As we receive each position, compare the size of the map (num received) with the number of cues on the first wall. When these match we have all locations queried.
When we have all locations queried, then we can.... (Set colors on launchpad?)
If any update is received, and that update is not any group cue, then query for all cues.
We can't clear and set colors on the launchpad every time something updates, since it will cause it to blink. Instead we will overwrite each button with its final color.
When connected to a workspace, query for running cues every 250ms.
When receiving the incoming cues, we will store the UUID in a list.
If we are adding a running cue to the list, we know it has just started.
If we are removing a running cue to the list, we know that it has just stopped.