Skip to content

Commit ce05549

Browse files
authored
Rename LightsOffAlarm to MasterLightsOff (#782)
1 parent 85bf827 commit ce05549

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

te-app/src/main/java/heronarts/lx/studio/TEApp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
import titanicsend.lx.EffectsMiniLab3;
9494
import titanicsend.model.TEWholeModel;
9595
import titanicsend.model.TEWholeModelDynamic;
96-
import titanicsend.modulator.LightsOffAlarm;
96+
import titanicsend.modulator.MasterLightsOff;
9797
import titanicsend.modulator.dmx.Dmx16bitModulator;
9898
import titanicsend.modulator.dmx.DmxDirectorColorModulator;
9999
import titanicsend.modulator.dmx.DmxDualRangeModulator;
@@ -533,7 +533,7 @@ public void initialize(LX lx) {
533533
lx.registry.addModulator(DmxDirectorColorModulator.class);
534534
lx.registry.addModulator(DmxDualRangeModulator.class);
535535
lx.registry.addModulator(DmxRangeModulator.class);
536-
lx.registry.addModulator(LightsOffAlarm.class);
536+
lx.registry.addModulator(MasterLightsOff.class);
537537
lx.registry.addModulator(MultiplierModulator.class);
538538

539539
// Output modulators

te-app/src/main/java/titanicsend/modulator/LightsOffAlarm.java renamed to te-app/src/main/java/titanicsend/modulator/MasterLightsOff.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
* Detects if the master fader is moved up by something else, in which case it displays a dialog to
2424
* alert the user to the alarm status.
2525
*/
26-
@LXModulator.Global("Lights Off Alarm")
26+
@LXModulator.Global("Master Lights Off")
2727
@LXCategory("Utility")
28-
public class LightsOffAlarm extends LXModulator implements UIModulatorControls<LightsOffAlarm> {
28+
public class MasterLightsOff extends LXModulator implements UIModulatorControls<MasterLightsOff> {
2929

3030
public final CompoundParameter startTime =
3131
new CompoundParameter("StartTime", 7, 0, 24)
@@ -66,11 +66,11 @@ public class LightsOffAlarm extends LXModulator implements UIModulatorControls<L
6666

6767
private long lastDialogDisplay = 0;
6868

69-
public LightsOffAlarm() {
70-
this("Lights Off Alarm");
69+
public MasterLightsOff() {
70+
this("Master Lights Off");
7171
}
7272

73-
public LightsOffAlarm(String label) {
73+
public MasterLightsOff(String label) {
7474
super(label);
7575

7676
addParameter("startTime", this.startTime);
@@ -181,15 +181,15 @@ private void beginAlarm() {
181181
updateAlarmLevel();
182182
this.lastParameterValue = getParameterValue();
183183

184-
LX.log("Lights Off Alarm STARTED at " + LocalTime.now());
184+
LX.log("Master Lights Off STARTED at " + LocalTime.now());
185185
showDialog();
186186
}
187187

188188
private void finishAlarm() {
189189
this.alarm = false;
190190
this.alarmLevel = 0;
191191

192-
LX.log("Lights Off Alarm FINISHED at " + LocalTime.now());
192+
LX.log("Master Lights Off FINISHED at " + LocalTime.now());
193193
}
194194

195195
private void updateAlarmLevel() {
@@ -214,7 +214,7 @@ private void tickAlarm(double deltaMs) {
214214
&& this.enableDialog.isOn()
215215
&& dialogTimeElapsed()) {
216216
LX.warning(
217-
"User tried to raise the master fader while it was suppressed by Lights Off Alarm");
217+
"User tried to raise the master fader while it was suppressed by Master Lights Off");
218218
showDialog();
219219
}
220220
this.lastParameterValue = parameterValue;
@@ -243,29 +243,29 @@ private void showDialog() {
243243
this.lastDialogDisplay = System.currentTimeMillis();
244244
if (this.lx instanceof GLX glx) {
245245
glx.ui.showContextDialogMessage(
246-
"WARNING! LightsOffAlarm is lowering the master fader to zero.");
246+
"WARNING! Master Lights Off is lowering the master fader to zero.");
247247
}
248248
}
249249

250250
private static final float labelWidth = 130;
251251

252252
@Override
253253
public void buildModulatorControls(
254-
LXStudio.UI ui, UIModulator uiModulator, LightsOffAlarm lightsOffAlarm) {
254+
LXStudio.UI ui, UIModulator uiModulator, MasterLightsOff modulator) {
255255
uiModulator.setLayout(UI2dContainer.Layout.VERTICAL, 2);
256256
uiModulator.addChildren(
257-
newRow("Start Time (hour of day)", newDoubleBox(lightsOffAlarm.startTime)),
258-
newRow("End Time (hour of day)", newDoubleBox(lightsOffAlarm.endTime)),
259-
newRow("Movement Duration (sec)", newDoubleBox(lightsOffAlarm.movementDuration)),
257+
newRow("Start Time (hour of day)", newDoubleBox(modulator.startTime)),
258+
newRow("End Time (hour of day)", newDoubleBox(modulator.endTime)),
259+
newRow("Movement Duration (sec)", newDoubleBox(modulator.movementDuration)),
260260
newRow(
261261
"Dialog",
262-
newButton(lightsOffAlarm.enableDialog)
262+
newButton(modulator.enableDialog)
263263
.setActiveLabel("Enabled")
264264
.setInactiveLabel("Disabled")),
265-
newRow("Dialog Frequency", newDoubleBox(lightsOffAlarm.dialogFrequencySec)),
265+
newRow("Dialog Frequency", newDoubleBox(modulator.dialogFrequencySec)),
266266
newRow(
267267
"Alarm",
268-
new UIIndicator(ui, lightsOffAlarm.alarmIndicator)
268+
new UIIndicator(ui, modulator.alarmIndicator)
269269
.setClickable(false)
270270
.setTriggerable(false)
271271
.setY(2)));

0 commit comments

Comments
 (0)