Skip to content

Commit

Permalink
fix: empty desired and fault parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
selengalp committed Oct 31, 2023
1 parent 8aff631 commit 9888d16
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions atcom.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ func open(args map[string]interface{}) (port *serial.Port, err error) {
func SendAT(command string, args map[string]interface{}) ([]string, error) {

var lineEnd bool = true
var desired []string
var fault []string
var timeout int
var desired []string = nil
var fault []string = nil
var timeout int = 5

for key, value := range args {
switch key {
Expand Down Expand Up @@ -124,6 +124,7 @@ func SendAT(command string, args map[string]interface{}) ([]string, error) {
}
}
} else {
found <- nil
return
}
} else if line == "ERROR" || strings.Contains(line, "+CME ERROR") {
Expand Down

0 comments on commit 9888d16

Please sign in to comment.