remove command function

This commit is contained in:
zhiqiang feng
2020-12-22 10:57:45 +08:00
parent 594f1e6778
commit 6f00ed6029
3 changed files with 11 additions and 4 deletions
+3
View File
@@ -31,6 +31,9 @@ func OpenPort(device string, baudrate int, bytesize byte) error {
func ReadPort() ([]byte, int){
buffer := make([]byte, 256)
if !ServerRunning {
return buffer, 0
}
count,err := port.Read(buffer)
if err != nil && err != io.EOF {
log.Println("error in read port ", err)