diff --git a/src/device/Driver.java b/src/device/Driver.java index 7a8bc7b..c6d5810 100644 --- a/src/device/Driver.java +++ b/src/device/Driver.java @@ -154,19 +154,16 @@ public class Driver{ } - public void setColor(Color color, Intensity intensity){ + public void setColor(Color color, Intensity intensity, Region region){ try { - this.device.sendFeatureReport(this.getReport(1,2,66,Region.LEFT.intValue(),color.intValue(),intensity.intValue(),0,236)); - this.device.sendFeatureReport(this.getReport(1,2,66,Region.MIDDLE.intValue(),color.intValue(),intensity.intValue(),0,236)); - this.device.sendFeatureReport(this.getReport(1,2,66,Region.RIGHT.intValue(),color.intValue(),intensity.intValue(),0,236)); - this.setMode(Mode.NORMAL); + this.device.sendFeatureReport(this.getReport(1,2,66,region.intValue(),color.intValue(),intensity.intValue(),0,236)); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } - public void setMode(Mode mode){ + public void commit(Mode mode){ try { this.device.sendFeatureReport(this.getReport(1,2,65,mode.intValue(),0,0,0,236)); } catch (IOException e) {