Debugged connection.

This commit is contained in:
Andrey Egorov
2024-07-23 17:26:24 +03:00
parent 6b8284ee47
commit a5d216ffc9
5 changed files with 22 additions and 12 deletions

View File

@ -86,7 +86,7 @@ func (p *atPort) makeReq(msg string) (string, error) {
}
// Read
readLen, err := p.port.Read(p.inputBuf)
log.Println("RAWREAD:", string(p.inputBuf[:readLen]))
log.Println(msg, "RAWREAD:", string(p.inputBuf[:readLen]))
if err != nil {
return "", fmt.Errorf("port read: %w", err)
}

View File

@ -12,6 +12,6 @@ func (resp Resp) RmFront(str string) Resp {
return Resp(string(resp)[len(str):])
}
func (resp Resp) Str() string {
func (resp Resp) String() string {
return string(resp)
}