Improved SMS.
This commit is contained in:
@ -85,7 +85,7 @@ func (g *gps) switchGpsMode(on bool) error {
|
||||
// Check gps mode status
|
||||
resp, err := g.port.Send("AT+CGPS?")
|
||||
if err != nil {
|
||||
return fmt.Errorf("make at ask: %w", err)
|
||||
return err
|
||||
}
|
||||
if !resp.Check() || !resp.CheckFront("+CGPS:") {
|
||||
return fmt.Errorf("get GPS mode: error response: %s", resp)
|
||||
@ -98,7 +98,7 @@ func (g *gps) switchGpsMode(on bool) error {
|
||||
// Modem is not in GPS mode
|
||||
resp, err = g.port.Send("AT+CGPS=" + onStr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("set GPS mode: %w", err)
|
||||
return err
|
||||
}
|
||||
if !resp.Check() {
|
||||
return fmt.Errorf("set GPS mode: error response: %s", resp)
|
||||
|
@ -56,7 +56,7 @@ func (g *gps) rawCollect(flags nmeaFlags) (string, error) {
|
||||
|
||||
// Set output rate to 10Hz
|
||||
if resp, err := g.port.Send("AT+CGPSNMEARATE=1"); err != nil {
|
||||
return "", fmt.Errorf("AT+CGPSNMEARATE= request: %w", err)
|
||||
return "", err
|
||||
} else {
|
||||
if !resp.Check() {
|
||||
return "", fmt.Errorf("set output rate: error response: %s", resp)
|
||||
|
Reference in New Issue
Block a user