Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (52 sloc) 1.51 KB
loadedInterfaceName = "{name}";
interfaceOrientation = "landscape";
aeolus = {{
groups: {groups},
chair: new Lawnchair('Aeolus'),
}}
general_cancel = function() {{
for (g=0; g<aeolus.groups.length; g++) {{
for (b=0; b<aeolus.groups[g].length; b++) {{
w = control.getWidgetWithName(aeolus.groups[g][b]);
if (w.value != 0)
w.setValue(0);
}}
}}
}}
store_preset = function(num) {{
p = [];
ag = aeolus.groups;
for (g=0; g<ag.length; g++) {{
p[g] = [];
for (b=0; b<ag[g].length; b++) {{
w = control.getWidgetWithName(ag[g][b]);
p[g][b] = w.value;
}}
}}
aeolus.chair.save({{key: 'preset' + num, preset: p}});
}}
recall_preset = function(num) {{
aeolus.chair.get('preset' + num, function(o) {{
ag = aeolus.groups;
for (g=0; g<ag.length; g++) {{
for (b=0; b<ag[g].length; b++) {{
w = control.getWidgetWithName(ag[g][b]);
// TODO if we ever have aeolus-informed synchronization of
// stops, we could only change the ones that aren't the way we
// want it, that would be faster.
w.setValue(o.preset[g][b]);
}}
}}
}});
}}
preset_action = function(num) {{
if (setButton.value == 0) {{
recall_preset(num);
}} else {{
store_preset(num);
setButton.setValue(0);
}}
setButton.setValue(0);
}}
pages = {pages};
// vim: filetype=javascript