add:com口读取工具

This commit is contained in:
zhangzq
2024-11-05 16:07:14 +08:00
parent 6dae0474c0
commit 383fe20168

View File

@@ -54,7 +54,9 @@ public class ComPortUtil {
if (bytesRead > 0) {
String msg = new String(buffer, 0, bytesRead);
System.out.println("--获取COM口信息--"+msg);
function.apply(msg);
if (function != null){
function.apply(msg);
}
}
}
} catch (Exception e) {