From 4dc76231538967d1eaec7e6d232c3b96090f6f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Tue, 6 Mar 2012 17:10:02 +0100 Subject: [PATCH] changed color setters to return status --- .../java/de/ctdo/bunti/model/Strobe1500.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/main/java/de/ctdo/bunti/model/Strobe1500.java b/src/main/java/de/ctdo/bunti/model/Strobe1500.java index 23001e6..a0a12bd 100644 --- a/src/main/java/de/ctdo/bunti/model/Strobe1500.java +++ b/src/main/java/de/ctdo/bunti/model/Strobe1500.java @@ -17,22 +17,27 @@ public class Strobe1500 extends BuntiDMXDevice { addChannel(new DMXChannel(2, CHANNEL_MODE)); } - public final void setSpeed(int value) { - setChannelValueByName(CHANNEL_SPEED, value); + public final boolean setSpeed(int value) { + return setChannelValueByName(CHANNEL_SPEED, value); } - public final void setIntensity(int value) { - setChannelValueByName(CHANNEL_INTENSITY, value); + + public final boolean setIntensity(int value) { + return setChannelValueByName(CHANNEL_INTENSITY, value); } - public final void setMode(int value) { - setChannelValueByName(CHANNEL_MODE, value); + + public final boolean setMode(int value) { + return setChannelValueByName(CHANNEL_MODE, value); } + public final int getSpeed() { return getChannelValueByName(CHANNEL_SPEED); } - public final int getIntensity() { + + public final int getIntensity() { return getChannelValueByName(CHANNEL_INTENSITY); } - public final int getMode() { + + public final int getMode() { return getChannelValueByName(CHANNEL_MODE); } @@ -53,7 +58,7 @@ public class Strobe1500 extends BuntiDMXDevice { @Override public final String toString() { return "Strobe1500 " + getDeviceId() + ", " + getDeviceName() + - "[" + getSpeed() + "," + getIntensity() + "," + getMode() + "]"; + " [" + getSpeed() + "," + getIntensity() + "," + getMode() + "]"; } }