summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-29 15:54:06 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-29 15:54:06 +0200
commit7a85f7e089f0a48df43aa30d0da8c6d25093ad8e (patch)
tree7a28d7b45eea39be44c2fa9445f532806a9e573c /src
parent41a9c74d351aaff298dcbdc289aeade9d50d8c12 (diff)
Simplify
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Driver.java2
-rw-r--r--src/drivers/DriverManager.java13
-rw-r--r--src/drivers/Driver_1770_ff00.java17
3 files changed, 6 insertions, 26 deletions
diff --git a/src/drivers/Driver.java b/src/drivers/Driver.java
index d362d19..fe86a1f 100644
--- a/src/drivers/Driver.java
+++ b/src/drivers/Driver.java
@@ -17,7 +17,7 @@ public interface Driver{
public Class<?> getType();
/**
- * Initialise the driver (do not initialise anything in the constructor).
+ * Initialize the driver (do not initialize anything in the constructor).
*
* @return true if success (device is present and accessible) false else.
*/
diff --git a/src/drivers/DriverManager.java b/src/drivers/DriverManager.java
index 9a3c37c..4321ec1 100644
--- a/src/drivers/DriverManager.java
+++ b/src/drivers/DriverManager.java
@@ -10,14 +10,13 @@ package org.manzerbredes.open_klm.drivers;
public class DriverManager{
/**
- * List of avalaible drivers
+ * List of available drivers
*/
private Class<?>[] drivers={
Driver_1770_ff00.class
};
-
/**
* Get a successfully loaded driver
*
@@ -36,13 +35,7 @@ public class DriverManager{
e.printStackTrace();
}
}
- // If no driver avalaible
+ // If no driver available
return null;
- }
-
-
-
-
-
-
+ }
} \ No newline at end of file
diff --git a/src/drivers/Driver_1770_ff00.java b/src/drivers/Driver_1770_ff00.java
index 9f849f9..602c29a 100644
--- a/src/drivers/Driver_1770_ff00.java
+++ b/src/drivers/Driver_1770_ff00.java
@@ -16,8 +16,6 @@ import com.codeminders.hidapi.*;
*/
public class Driver_1770_ff00 implements Driver, DriverTypeA{
-
-
/**
* Device entry
*/
@@ -67,22 +65,11 @@ public class Driver_1770_ff00 implements Driver, DriverTypeA{
* @return
*/
private byte[] getReport(int a, int b, int c, int d, int e, int f, int g, int h){
- byte[] message = new byte[8];
- message[0] = (byte) a;
- message[1] = (byte) b;
- message[2] = (byte) c;
- message[3] = (byte) d;
- message[4] = (byte) e;
- message[5] = (byte) f;
- message[6] = (byte) g;
- message[7] = (byte) h;
- return message;
+ byte[] report={(byte) a,(byte) b,(byte) c,(byte) d,(byte) e,(byte) f,(byte) g,(byte) h};
+ return report;
}
-
-
-
/**
* Commit (apply current mode to update the color)
*/