Skip to content

Commit 6ab4ba7

Browse files
author
Stephen Buchanan
authored
Feature/high res (#9)
* WIP, LoRes working again, not through GUI * POC high res brightness control (remote, not UI) * working HiRes controls, all fixture definitions updated * HiRes is the definitive example now * MIDI values need to be converted for u16 macros, too * more readable conversion * Animations only need to be f32 * remove unused hover label * v0.8 supports 16-bit macro controls
1 parent 52c32f2 commit 6ab4ba7

17 files changed

Lines changed: 289 additions & 317 deletions

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tether-artnet-controller"
3-
version = "0.7.4"
3+
version = "0.8.0"
44
edition = "2021"
55
repository = "https://github.com/RandomStudio/tether-artnet-controller"
66
homepage = "https://github.com/RandomStudio/tether-artnet-controller"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ If you have Tether Egui installed (`cargo install tether-egui`) then the easiest
6262
- [x] Allow the app to launch just fine without Tether
6363
- [x] If no ArtNet provided in Project (and no settings provided from CLI), then do NOT connect, but allow editing / manual connect
6464
- [x] Allow Tether settings to be saved with project as well
65+
- [ ] Add amber Macros for some fixtures (and include these in scenes)
6566
- [ ] Keep project files sorted, e.g. by fixtures
6667
- [x] Allow the app to launch without any project file at all
67-
- [ ] Add 16-bit control, at least for macros (single slider adjusts the two channels as split between first and second 8-bit digits)
68+
- [x] Add 16-bit control, at least for macros (single slider adjusts the two channels as split between first and second 8-bit digits)
6869
- [ ] ArtNet on separate thread, with more precise timing; this might require some messaging back and forth and/or mutex
6970
- [ ] It should be possible to add Macros from "Advanced Mode" into the available macros for the fixtures (and therefore the scenes). This would be part of a fixture-editing UI?

build.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ fn main() {
1717

1818
for (index, fixture_path) in entries.iter().enumerate() {
1919
println!("Fixture file: {:?}", fixture_path);
20-
match fs::read_to_string(fixture_path) {
21-
Ok(d) => {
22-
entire_string.push_str(&d);
23-
if index < (entries.len() - 1) {
24-
entire_string.push(',');
20+
if fixture_path.is_file() {
21+
match fs::read_to_string(fixture_path) {
22+
Ok(d) => {
23+
entire_string.push_str(&d);
24+
if index < (entries.len() - 1) {
25+
entire_string.push(',');
26+
}
27+
}
28+
Err(e) => {
29+
panic!(
30+
"Something went wrong reading the contents of the fixture file: {}",
31+
e
32+
);
2533
}
26-
}
27-
Err(e) => {
28-
panic!(
29-
"Something went wrong reading the contents of the fixture file: {}",
30-
e
31-
);
3234
}
3335
}
3436
}

example.project.json

Lines changed: 14 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@
3434
"ControlValue": 195
3535
},
3636
"colour": {
37-
"ColourValue": [
38-
255,
39-
0,
40-
245,
41-
255
42-
]
37+
"ColourValue": [255, 0, 245, 255]
4338
},
4439
"pan": {
4540
"ControlValue": 50
@@ -56,12 +51,7 @@
5651
"ControlValue": 255
5752
},
5853
"colour": {
59-
"ColourValue": [
60-
49,
61-
81,
62-
255,
63-
255
64-
]
54+
"ColourValue": [49, 81, 255, 255]
6555
},
6656
"pan": {
6757
"ControlValue": 155
@@ -78,12 +68,7 @@
7868
"ControlValue": 255
7969
},
8070
"colour": {
81-
"ColourValue": [
82-
0,
83-
104,
84-
255,
85-
255
86-
]
71+
"ColourValue": [0, 104, 255, 255]
8772
},
8873
"pan": {
8974
"ControlValue": 105
@@ -100,12 +85,7 @@
10085
"ControlValue": 255
10186
},
10287
"colour": {
103-
"ColourValue": [
104-
243,
105-
0,
106-
255,
107-
255
108-
]
88+
"ColourValue": [243, 0, 255, 255]
10989
},
11090
"pan": {
11191
"ControlValue": 60
@@ -127,12 +107,7 @@
127107
"ControlValue": 255
128108
},
129109
"colour": {
130-
"ColourValue": [
131-
37,
132-
0,
133-
243,
134-
255
135-
]
110+
"ColourValue": [37, 0, 243, 255]
136111
},
137112
"pan": {
138113
"ControlValue": 67
@@ -149,12 +124,7 @@
149124
"ControlValue": 255
150125
},
151126
"colour": {
152-
"ColourValue": [
153-
237,
154-
255,
155-
0,
156-
255
157-
]
127+
"ColourValue": [237, 255, 0, 255]
158128
},
159129
"pan": {
160130
"ControlValue": 15
@@ -171,12 +141,7 @@
171141
"ControlValue": 15
172142
},
173143
"colour": {
174-
"ColourValue": [
175-
244,
176-
222,
177-
159,
178-
255
179-
]
144+
"ColourValue": [244, 222, 159, 255]
180145
},
181146
"pan": {
182147
"ControlValue": 60
@@ -193,12 +158,7 @@
193158
"ControlValue": 15
194159
},
195160
"colour": {
196-
"ColourValue": [
197-
255,
198-
237,
199-
220,
200-
255
201-
]
161+
"ColourValue": [255, 237, 220, 255]
202162
},
203163
"pan": {
204164
"ControlValue": 30
@@ -220,12 +180,7 @@
220180
"ControlValue": 255
221181
},
222182
"colour": {
223-
"ColourValue": [
224-
0,
225-
0,
226-
0,
227-
0
228-
]
183+
"ColourValue": [0, 0, 0, 0]
229184
},
230185
"pan": {
231186
"ControlValue": 193
@@ -242,12 +197,7 @@
242197
"ControlValue": 255
243198
},
244199
"colour": {
245-
"ColourValue": [
246-
0,
247-
0,
248-
0,
249-
0
250-
]
200+
"ColourValue": [0, 0, 0, 0]
251201
},
252202
"pan": {
253203
"ControlValue": 205
@@ -264,12 +214,7 @@
264214
"ControlValue": 255
265215
},
266216
"colour": {
267-
"ColourValue": [
268-
0,
269-
0,
270-
0,
271-
0
272-
]
217+
"ColourValue": [0, 0, 0, 0]
273218
},
274219
"pan": {
275220
"ControlValue": 82
@@ -286,12 +231,7 @@
286231
"ControlValue": 255
287232
},
288233
"colour": {
289-
"ColourValue": [
290-
0,
291-
0,
292-
0,
293-
0
294-
]
234+
"ColourValue": [0, 0, 0, 0]
295235
},
296236
"pan": {
297237
"ControlValue": 165
@@ -311,9 +251,6 @@
311251
"noteStart": 49
312252
},
313253
"artnetConfig": {
314-
"Unicast": [
315-
"127.0.0.1",
316-
"127.0.0.1"
317-
]
254+
"Unicast": ["127.0.0.1", "127.0.0.1"]
318255
}
319-
}
256+
}

0 commit comments

Comments
 (0)