1
0
mirror of https://github.com/cmur2/miflorad.git synced 2024-12-21 16:54:24 +01:00

utils: remove unused legacy tool

This commit is contained in:
cn 2019-05-15 17:03:50 +02:00
parent cbe0bd62ae
commit 0595d76f00
3 changed files with 2 additions and 155 deletions

2
go.mod
View File

@ -10,8 +10,6 @@ require (
github.com/mattn/go-isatty v0.0.7 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab // indirect
github.com/muka/ble v0.0.0-20190513013040-27e2a040284b // indirect
github.com/muka/go-bluetooth v0.0.0-20190515124052-127007ab0f74
github.com/pkg/errors v0.8.1
github.com/sirupsen/logrus v1.4.1 // indirect
github.com/stretchr/testify v1.3.0

26
go.sum
View File

@ -18,11 +18,8 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/go-ble/ble v0.0.0-20181002102605-e78417b510a3 h1:rsLGztXl2QJvj4x/PAWzC1Zx6tnTDKlosaXAZfaXM8M=
github.com/go-ble/ble v0.0.0-20181002102605-e78417b510a3/go.mod h1:UMPB54/KFpdTdfH7Yovhk3J6kzgzE88e3QZi8cbayis=
github.com/go-ble/ble v0.0.0-20190515144946-e4c77014ff5a h1:Di8pZP1T0FmSSK1x+TsKQnq3Wn1dZ5wbpvLcqgit9wo=
github.com/go-ble/ble v0.0.0-20190515144946-e4c77014ff5a/go.mod h1:UMPB54/KFpdTdfH7Yovhk3J6kzgzE88e3QZi8cbayis=
github.com/godbus/dbus v0.0.0-20181031085051-66d97ae h1:NTs1uIj/Ru/QlpKwd9C9dnv/5zblvCXH7Dbn2oi3p98=
github.com/godbus/dbus v0.0.0-20181031085051-66d97ae/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
@ -39,22 +36,6 @@ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1f
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab h1:n8cgpHzJ5+EDyDri2s/GC7a9+qK3/YEGnBsd0uS/8PY=
github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab/go.mod h1:y1pL58r5z2VvAjeG1VLGc8zOQgSOzbKN7kMHPvFXJ+8=
github.com/muka/ble v0.0.0-20180314094923-5613a57406d1 h1:DrMDOYCxMG7TUMjhBWnRsgPfpPlz0sFL11ukl+2+CZU=
github.com/muka/ble v0.0.0-20180314094923-5613a57406d1/go.mod h1:1lEPQDLh8Z86+REeQMqID8UpXCSdHF0fvU0qZj3b1eA=
github.com/muka/ble v0.0.0-20190208060657-c5982255bf40/go.mod h1:1lEPQDLh8Z86+REeQMqID8UpXCSdHF0fvU0qZj3b1eA=
github.com/muka/ble v0.0.0-20190208063703-c5982255bf40/go.mod h1:1lEPQDLh8Z86+REeQMqID8UpXCSdHF0fvU0qZj3b1eA=
github.com/muka/ble v0.0.0-20190513013040-27e2a040284b/go.mod h1:1lEPQDLh8Z86+REeQMqID8UpXCSdHF0fvU0qZj3b1eA=
github.com/muka/go-bluetooth v0.0.0-20181012115104-31d8f53bf9a1 h1:VKhCDuxZ3+Bg+Plf7+CxgGRlNEdwHDKUqHoZLzer8Ms=
github.com/muka/go-bluetooth v0.0.0-20181012115104-31d8f53bf9a1/go.mod h1:brKFFAJeW2mWp1W5D/GJhwbn3IpNR69jIm1qGWZcl50=
github.com/muka/go-bluetooth v0.0.0-20190123084403-a5ba83cc4d9b/go.mod h1:brKFFAJeW2mWp1W5D/GJhwbn3IpNR69jIm1qGWZcl50=
github.com/muka/go-bluetooth v0.0.0-20190204113330-048fce4f8d39/go.mod h1:brKFFAJeW2mWp1W5D/GJhwbn3IpNR69jIm1qGWZcl50=
github.com/muka/go-bluetooth v0.0.0-20190205215946-510f85fa3c30/go.mod h1:brKFFAJeW2mWp1W5D/GJhwbn3IpNR69jIm1qGWZcl50=
github.com/muka/go-bluetooth v0.0.0-20190222211956-d9e43e1ad94a/go.mod h1:tbUgXz7VZqw14AD1gArXW8wcVQtfGWBZAIhyMziuTck=
github.com/muka/go-bluetooth v0.0.0-20190304025249-ed5c4e1993e2/go.mod h1:tbUgXz7VZqw14AD1gArXW8wcVQtfGWBZAIhyMziuTck=
github.com/muka/go-bluetooth v0.0.0-20190325005234-1174effa3337/go.mod h1:tbUgXz7VZqw14AD1gArXW8wcVQtfGWBZAIhyMziuTck=
github.com/muka/go-bluetooth v0.0.0-20190401025540-94cf950711a5/go.mod h1:tbUgXz7VZqw14AD1gArXW8wcVQtfGWBZAIhyMziuTck=
github.com/muka/go-bluetooth v0.0.0-20190415005617-5c67d8618acd/go.mod h1:tbUgXz7VZqw14AD1gArXW8wcVQtfGWBZAIhyMziuTck=
github.com/muka/go-bluetooth v0.0.0-20190515124052-127007ab0f74/go.mod h1:brKFFAJeW2mWp1W5D/GJhwbn3IpNR69jIm1qGWZcl50=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
@ -67,15 +48,11 @@ github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -83,6 +60,7 @@ golang.org/x/net v0.0.0-20190107174441-1a61f4433d85/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190111034749-915654e7eabc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190301014737-92fc7df08ae7 h1:izsVbp6aRPsQs382yTgqgK3Sz5mgX1N/DQVRIYelTQE=
golang.org/x/net v0.0.0-20190301014737-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190501013750-9ce7a6920f09 h1:5S8x497/nsQl7/BhsbJWW6AUJO4fVkqOQN8JOmPoiuM=
golang.org/x/net v0.0.0-20190501013750-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

View File

@ -1,129 +0,0 @@
//shows how to watch for new devices and list them
package legacy
import (
"os"
"github.com/muka/go-bluetooth/api"
"github.com/muka/go-bluetooth/emitter"
log "github.com/sirupsen/logrus"
)
const adapterID = "hci0"
// func main() {
// manager, err := api.NewManager()
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// err = manager.RefreshState()
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// var address = "C4:7C:8D:66:D5:27"
//
// dev, err := api.GetDeviceByAddress(address)
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// if dev == nil {
// log.Infof("No device found!")
// os.Exit(1)
// }
//
// dev.GetAllServicesAndUUID()
//
// props, err := dev.GetProperties()
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// log.Infof("name=%s addr=%s rssi=%d", props.Name, props.Address, props.RSSI)
//
// err = dev.Connect()
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// if !dev.IsConnected() {
// log.Infof("Device not connected!")
// os.Exit(1)
// }
//
// y, err := dev.GetCharByUUID("00002a00-0000-1000-8000-00805f9b34fb")
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// log.Infof(y.Path)
//
// err = dev.Disconnect()
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
// }
// func main() {
// log.SetLevel(log.DebugLevel)
//
// // clean up connection on exit
// defer api.Exit()
//
// manager, err := api.NewManager()
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// err = manager.RefreshState()
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
//
// boo, err := api.AdapterExists(adapterID)
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
// log.Debugf("AdapterExists: %b", boo)
//
// err = api.StartDiscoveryOn(adapterID)
// if err != nil {
// log.Error(err)
// os.Exit(1)
// }
// log.Debugf("Started discovery")
//
// err = api.On("discovery", emitter.NewCallback(func(ev emitter.Event) {
// discoveryEvent := ev.GetData().(api.DiscoveredDeviceEvent)
// dev := discoveryEvent.Device
// handleDevice(dev)
// }))
//
// select {}
// }
//
// func handleDevice(dev *api.Device) {
// if dev == nil {
// return
// }
//
// props, err := dev.GetProperties()
// if err != nil {
// log.Error(err)
// return
// }
//
// log.Infof("name=%s addr=%s rssi=%d", props.Name, props.Address, props.RSSI)
// }