summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-29 15:57:52 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-29 15:57:52 +0200
commitfafcd1ba9f737b7803cc92f5b199df05235b1066 (patch)
tree707b95bc980c6e41dc54134a6ececad9428e52c8
parent7a85f7e089f0a48df43aa30d0da8c6d25093ad8e (diff)
Add state
-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 602c29a..9b1d169 100644
--- a/src/drivers/Driver_1770_ff00.java
+++ b/src/drivers/Driver_1770_ff00.java
@@ -24,7 +24,7 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
/**
* Define Keyboard color state
*/
- private HashMap<Region, Pair<Color,Intensity>> KeyboardColor=new HashMap<>();
+ private HashMap<Region, Pair<Color,Intensity>> keyboardColorsState=new HashMap<>();
/**
* Define Keyboard mode state
@@ -88,6 +88,7 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
try {
this.device.sendFeatureReport(this.getReport(1,2,66,region.intValue(),color.intValue(),intensity.intValue(),0,236));
this.commit();
+ this.keyboardColorsState.put(region, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -104,6 +105,10 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
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();
+ this.keyboardColorsState.put(Region.LEFT, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
+ this.keyboardColorsState.put(Region.MIDDLE, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
+ this.keyboardColorsState.put(Region.RIGHT, new Pair<DriverTypeA.Color, DriverTypeA.Intensity>(color, intensity));
+
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();