remove command function
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user