diff --git a/plugins/LaserUE.java b/plugins/LaserUE.java index 089d5e1..30a6619 100644 --- a/plugins/LaserUE.java +++ b/plugins/LaserUE.java @@ -22,18 +22,14 @@ public class LaserUE extends SerialPortDevice{ int value = 0; int count = 0; - /* - @Override - protected int readByte() throws IOException { - int ret = super.readByte(); - System.out.print(ret); - return ret; - } -*/ + @Override protected void onByte(int rx) { - System.out.println(rx); + if (rx<0){ + rx+=256; + } + System.out.println(rx); int index = ((rx&BIT7) > 0) ? 2 : (((rx&BIT6) > 0) ? 1 : 0); if (count==index){ if (index ==0){