Startup
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user