Skip to content

Commit

Permalink
Report null rssi instead of huge value if no connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenart12 committed Feb 1, 2025
1 parent dc233a6 commit b971a05
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/ble/control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"math"
"os"
"strings"
"time"
Expand Down Expand Up @@ -144,8 +143,8 @@ func processIfConnectionStatusCommand(command *commands.Command, operated bool)
resp = map[string]interface{}{
"local_name": ble.VehicleLocalName(command.Vin),
"connectable": false,
"address": "",
"rssi": math.MinInt32,
"address": nil,
"rssi": nil,
"operated": false,
}
}
Expand Down

0 comments on commit b971a05

Please sign in to comment.