diff --git a/README.md b/README.md index 9e06a3a..d25eb5c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ # CobraV2 -## Installation +## Installation and compilation ```bash git clone https://www.github.com/foglar/cobraV2.git -``` +cd cobraV2/serial_read -```bash # Building serial read code yourself -cd serial_read go build main.go ``` diff --git a/serial_read/main.go b/serial_read/main.go index 613f55e..1502d05 100644 --- a/serial_read/main.go +++ b/serial_read/main.go @@ -103,8 +103,8 @@ func main() { } i++ } - - if port == "" { + _, err := os.Stat(port) + if port == "" || os.IsNotExist(err) { port = portInput() } if baudrate == 0 {