summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Driver_1770_ff00.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drivers/Driver_1770_ff00.java b/src/drivers/Driver_1770_ff00.java
index 01e9f59..c0f450b 100644
--- a/src/drivers/Driver_1770_ff00.java
+++ b/src/drivers/Driver_1770_ff00.java
@@ -102,8 +102,10 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
@Override
public void setRegionColor(Region region, Color color, Intensity intensity) {
try {
+ // Set the color of the region
this.device.sendFeatureReport(this.getReport(1,2,66,region.intValue(),color.intValue(),intensity.intValue(),0,236));
this.commit();
+ // Save the color of the region
this.primaryColorsState.put(region, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
} catch (IOException e) {
e.printStackTrace();
@@ -116,10 +118,12 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
@Override
public void setColor(Color color, Intensity intensity) {
try {
+ // Apply color to all region
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.commit();
+ // Save the color of all region
this.primaryColorsState.put(Region.LEFT, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
this.primaryColorsState.put(Region.MIDDLE, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
this.primaryColorsState.put(Region.RIGHT, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
@@ -155,7 +159,6 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
}
}
-
// Apply mode
this.commit();
}
@@ -169,6 +172,7 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
@Override
public void setSecondaryColor(Color color, Intensity intensity) {
+ // Set the secondary color of al regions
this.secondaryColorsState.put(Region.LEFT, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
this.secondaryColorsState.put(Region.MIDDLE, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
this.secondaryColorsState.put(Region.RIGHT, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
@@ -177,6 +181,7 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
@Override
public void setSecondaryRegionColor(Region region, Color color, Intensity intensity) {
+ // Set the secondary color of the region
this.secondaryColorsState.put(region, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
}