Bug fixes.
UI updates.
This commit is contained in:
parent
0bc4aa5f3b
commit
96f672e245
7 changed files with 52 additions and 24 deletions
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>loper</groupId>
|
||||
<artifactId>LogiLedus</artifactId>
|
||||
<version>1.2-SNAPSHOT</version>
|
||||
<version>1.3-SNAPSHOT</version>
|
||||
|
||||
<!-- <url></url> -->
|
||||
<description>
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.Locale;
|
|||
import java.util.ResourceBundle;
|
||||
|
||||
public class MainFx extends Application {
|
||||
public static final String appVersion = "v1.2";
|
||||
public static final String appVersion = "v1.3";
|
||||
|
||||
private static boolean traySupport = true;
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ public class EffectsThread extends LoThread {
|
|||
|
||||
private byte[] command;
|
||||
|
||||
private byte[] commit = {
|
||||
0x11, (byte) 0xff, 0x03, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to set effects
|
||||
* @param effectData : set of rules, always not empty and not null
|
||||
|
@ -61,8 +66,10 @@ public class EffectsThread extends LoThread {
|
|||
|
||||
handler = usbConnect.getHandlerKbrd();
|
||||
|
||||
if (! write(command))
|
||||
MessagesConsumer.getInstance().inform("Complete!");
|
||||
if (! write(command)){
|
||||
if (! write(commit))
|
||||
MessagesConsumer.getInstance().inform("Complete!");
|
||||
}
|
||||
|
||||
usbConnect.close();
|
||||
return null;
|
||||
|
|
|
@ -2,6 +2,7 @@ package logiledus.USB;
|
|||
|
||||
import javafx.concurrent.Task;
|
||||
import logiledus.MessagesConsumer;
|
||||
import logiledus.RainbowHexDump;
|
||||
import org.usb4java.DeviceHandle;
|
||||
import org.usb4java.LibUsb;
|
||||
|
||||
|
@ -37,11 +38,12 @@ abstract class LoThread extends Task<Void> {
|
|||
IntBuffer readBufTrans = IntBuffer.allocate(1);
|
||||
LibUsb.interruptTransfer(handler, (byte) 0x82, readBuffer, readBufTrans, 1000);
|
||||
/*
|
||||
readBufTrans.rewind();
|
||||
readBuffer.rewind();
|
||||
byte[] arr = new byte[readBuffer.get()];
|
||||
byte[] arr = new byte[readBufTrans.get()];
|
||||
readBuffer.get(arr);
|
||||
RainbowHexDump.hexDumpUTF8(arr);
|
||||
*/
|
||||
//*/
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public class UsbConnect {
|
|||
private DeviceHandle handlerKbrd;
|
||||
|
||||
private boolean connected = false;
|
||||
|
||||
|
||||
public UsbConnect(){
|
||||
MessagesConsumer mc = MessagesConsumer.getInstance();
|
||||
|
||||
|
@ -67,17 +67,8 @@ public class UsbConnect {
|
|||
|
||||
LibUsb.freeDeviceList(deviceList, true);
|
||||
|
||||
// Check if this device uses kernel driver and detach if possible:
|
||||
result = LibUsb.kernelDriverActive(handlerKbrd, DEFAULT_INTERFACE);
|
||||
if (result == 1) { // used by kernel
|
||||
if (LibUsb.detachKernelDriver(handlerKbrd, DEFAULT_INTERFACE) != LibUsb.SUCCESS) {
|
||||
mc.inform("Detach kernel failed: " + UsbErrorCodes.getErrCode(result));
|
||||
close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (result != LibUsb.SUCCESS)
|
||||
mc.inform("Can't proceed with libusb driver : "+UsbErrorCodes.getErrCode(result));
|
||||
// I don't really care what is resulting value for this
|
||||
LibUsb.setAutoDetachKernelDriver(handlerKbrd, true);
|
||||
|
||||
// Claim interface
|
||||
result = LibUsb.claimInterface(handlerKbrd, DEFAULT_INTERFACE);
|
||||
|
|
|
@ -216,24 +216,38 @@
|
|||
.tab-pane .tab:hover SVGPath{
|
||||
-fx-fill: #d0d0d0;
|
||||
}
|
||||
/*
|
||||
.tab-pane .tab{
|
||||
-fx-background-color: #3c3f41; /* #2b2b2b; */
|
||||
-fx-background-color: #3c3f41;
|
||||
-fx-focus-color: transparent;
|
||||
-fx-faint-focus-color: transparent;
|
||||
-fx-border-radius: 0 0 0 0;
|
||||
-fx-border-width: 0 0 3 0;
|
||||
-fx-border-color: #2b2b2b;
|
||||
}
|
||||
|
||||
.tab-pane .tab:selected{
|
||||
-fx-background-color: #3c3f41;/*#2b2b2b; */
|
||||
|
||||
-fx-background-color: #3c3f41;
|
||||
-fx-focus-color: transparent;
|
||||
-fx-faint-focus-color: transparent;
|
||||
-fx-border-radius: 0 0 0 0;
|
||||
-fx-border-width: 0 0 3 0;
|
||||
-fx-border-color: #40b9bb; /* #289de8; */
|
||||
-fx-border-color: #40b9bb;
|
||||
}
|
||||
*/
|
||||
|
||||
.tab-pane .tab{
|
||||
-fx-background-color: #3c3f41;
|
||||
-fx-background-radius: 2;
|
||||
-fx-focus-color: transparent;
|
||||
-fx-faint-focus-color: transparent;
|
||||
}
|
||||
.tab-pane .tab:selected{
|
||||
-fx-background-color: #40b9bb;
|
||||
-fx-background-radius: 2;
|
||||
-fx-focus-color: transparent;
|
||||
-fx-faint-focus-color: transparent;
|
||||
}
|
||||
.tab-pane > .tab-header-area {
|
||||
-fx-background-insets: 0.0;
|
||||
-fx-padding: 5 5 5 5;
|
||||
|
|
|
@ -205,11 +205,12 @@
|
|||
-fx-fill: #2c2c2c;
|
||||
}
|
||||
.tab-pane .tab:selected SVGPath, .tab-pane .tab:selected:hover SVGPath{
|
||||
-fx-fill: #141414;
|
||||
-fx-fill: #ebebeb;
|
||||
}
|
||||
.tab-pane .tab:hover SVGPath{
|
||||
-fx-fill: #2b2b2b;
|
||||
}
|
||||
/*
|
||||
.tab-pane .tab{
|
||||
-fx-background-color: #fefefe;
|
||||
-fx-focus-color: transparent;
|
||||
|
@ -225,9 +226,22 @@
|
|||
-fx-faint-focus-color: transparent;
|
||||
-fx-border-radius: 0 0 0 0;
|
||||
-fx-border-width: 0 0 3 0;
|
||||
-fx-border-color: #40b9bb; /* #289de8; */
|
||||
-fx-border-color: #40b9bb;
|
||||
}
|
||||
*/
|
||||
.tab-pane .tab{
|
||||
-fx-background-color: #fefefe;
|
||||
-fx-background-radius: 2;
|
||||
-fx-focus-color: transparent;
|
||||
-fx-faint-focus-color: transparent;
|
||||
}
|
||||
|
||||
.tab-pane .tab:selected{
|
||||
-fx-background-color: #40b9bb;
|
||||
-fx-background-radius: 2;
|
||||
-fx-focus-color: transparent;
|
||||
-fx-faint-focus-color: transparent;
|
||||
}
|
||||
.tab-pane > .tab-header-area {
|
||||
-fx-background-insets: 0.0;
|
||||
-fx-padding: 5 5 5 5;
|
||||
|
|
Loading…
Reference in a new issue