change how we handle ble bluetooth messages.

This commit is contained in:
Henry Seurer 2024-11-19 08:31:47 -08:00
parent 901972c7b8
commit 2cc64731f1
2 changed files with 5 additions and 21 deletions

15
go.mod
View File

@ -1,18 +1,3 @@
module git.bellaerba.dev/henry/farm-messages
go 1.23
require tinygo.org/x/bluetooth v0.10.0
require (
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/saltosystems/winrt-go v0.0.0-20241030114511-98be01919aa6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/soypat/cyw43439 v0.0.0-20241116210509-ae1ce0e084c5 // indirect
github.com/soypat/seqs v0.0.0-20240527012110-1201bab640ef // indirect
github.com/tinygo-org/cbgo v0.0.4 // indirect
github.com/tinygo-org/pio v0.0.0-20240901140349-27cbe9d986eb // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/sys v0.27.0 // indirect
)

View File

@ -35,7 +35,6 @@ import (
"strings"
"sync/atomic"
"time"
"tinygo.org/x/bluetooth"
)
type BuildVersion struct {
@ -967,16 +966,16 @@ type StatusMessage struct {
States map[string]bool `json:"states,omitempty"`
}
type BleCompany struct {
type BleManufacturerData struct {
CompanyId uint16 `json:"company_id,omitempty"`
Name string `json:"name,omitempty"`
Data []byte `json:"data,omitempty"`
}
type BleAdvertisementPayload struct {
LocalName string `json:"localName,omitempty"`
Companies []BleCompany `json:"companies,omitempty"`
Bytes []byte `json:"bytes,omitempty"`
ManufacturerData []bluetooth.ManufacturerDataElement `json:"manufacturerData,omitempty"`
ManufacturerData []BleManufacturerData `json:"companies,omitempty"`
}
type BleDevice struct {