This commit is contained in:
gac-S_Changer
2017-08-31 17:34:49 +02:00
parent c8c18059cb
commit 9b416da4f7

View File

@@ -18,6 +18,7 @@ public class LaserUE extends SerialPortDevice{
public LaserUE(String name, String port) {
super(name, port, 921600, SerialPortDeviceConfig.DataBits.DB_8, SerialPortDeviceConfig.StopBits.SB_1, SerialPortDeviceConfig.Parity.None);
this.setMode(Mode.FullDuplex);
/*
System.out.println("XXX");
new Thread(new Runnable() {
@@ -26,8 +27,7 @@ public class LaserUE extends SerialPortDevice{
System.out.println("Starting");
while(!isClosed()){
try{
if (isInitialized()){
System.out.println("R");
if (isInitialized()){
int rx;
while ((rx = readByte()) >= 0) {
onByte((byte) rx);
@@ -45,6 +45,7 @@ public class LaserUE extends SerialPortDevice{
System.out.println("Quiting");
}
}).start();
*/
}
int value = 0;
@@ -59,7 +60,7 @@ public class LaserUE extends SerialPortDevice{
@Override
protected void onByte(int rx) {
//System.out.print(rx);
System.out.println(rx);
if (rx < 0) {
count = 0;
} else {