Code refactoring for app module

This commit is contained in:
Alex X
2024-06-01 19:18:26 +03:00
parent 2ab1d9d774
commit 756be9801e
15 changed files with 182 additions and 217 deletions
+2 -3
View File
@@ -6,7 +6,6 @@ import (
"encoding/json"
"errors"
"fmt"
"log"
"net/rpc"
"net/url"
"strconv"
@@ -138,7 +137,7 @@ func (c *Client) Connect() error {
}
offer := pc.LocalDescription()
log.Printf("[roborock] offer\n%s", offer.SDP)
//log.Printf("[roborock] offer\n%s", offer.SDP)
if err = c.SendSDPtoRobot(offer); err != nil {
return err
}
@@ -151,7 +150,7 @@ func (c *Client) Connect() error {
time.Sleep(time.Second)
if desc, _ := c.GetDeviceSDP(); desc != nil {
log.Printf("[roborock] answer\n%s", desc.SDP)
//log.Printf("[roborock] answer\n%s", desc.SDP)
if err = c.conn.SetAnswer(desc.SDP); err != nil {
return err
}