aboutsummaryrefslogtreecommitdiff
path: root/radio
diff options
context:
space:
mode:
Diffstat (limited to 'radio')
-rw-r--r--radio/mqtt.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/radio/mqtt.go b/radio/mqtt.go
deleted file mode 100644
index c93fbad..0000000
--- a/radio/mqtt.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package radio
-
-import (
- mqtt "github.com/eclipse/paho.mqtt.golang"
- "time"
-)
-
-// some debugging junk that needs to be deleted
-type FakeRadio struct {
- ID uint32
-}
-
-func NewFakeRadio() (*FakeRadio, error) {
- opts := mqtt.NewClientOptions().AddBroker("tcp://mqtt.meshtastic.org:1883").SetClientID("poopypants").SetUsername("meshdev").SetPassword("large4cats")
- opts.SetKeepAlive(2 * time.Second)
- //opts.SetDefaultPublishHandler(f)
- opts.SetPingTimeout(1 * time.Second)
-
- c := mqtt.NewClient(opts)
- if token := c.Connect(); token.Wait() && token.Error() != nil {
- panic(token.Error())
- }
- ugh := c.Subscribe("msh/2/c/#", 0, func(client mqtt.Client, message mqtt.Message) {
-
- })
- _ = ugh
-
- return nil, nil
-}