Skip to content

Commit

Permalink
mock out modemInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
joshspicer committed Mar 27, 2023
1 parent 148c8c6 commit fa2a75d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/nodeRouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ func getNodeInfo(c *gin.Context) {

modem := at.New(mio, at.WithTimeout(5*time.Second))

var info string = "ERR"
//var info string = "ERR"
var signalStrength string = "ERR"
var gpsLatitude float32 = 12.517572
var gpsLongitude float32 = -69.9649462

infoArr, err := modem.Command("I")
if err == nil {
info = infoArr[0]
}
//infoArr, err := modem.Command("I")
//if err == nil {
// info = infoArr[0]
//}

// +CSQ: 23,99
signalStrengthArr, err := modem.Command("+CSQ")
Expand All @@ -69,7 +69,7 @@ func getNodeInfo(c *gin.Context) {
}

c.JSON(http.StatusOK, gin.H{
"modemInfo": info[0],
"modemInfo": "modemInfo",
"signal": signalStrength,
"accessoriesBattery": -1, // Mock
"gpsLatitude": gpsLatitude,
Expand Down

0 comments on commit fa2a75d

Please sign in to comment.