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