changed color setters to return status

This commit is contained in:
Lucas Pleß 2012-03-06 17:10:02 +01:00
parent 19d286fa29
commit 4dc7623153
1 changed files with 14 additions and 9 deletions

View File

@ -17,21 +17,26 @@ 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() {
return getChannelValueByName(CHANNEL_INTENSITY);
}
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() + "]";
}
}