Decoupled net package from espat

This commit is contained in:
BCG
2019-12-15 11:50:21 -05:00
committed by Ron Evans
parent 7b56e61d52
commit cc5ecafacf
13 changed files with 84 additions and 35 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"time"
"tinygo.org/x/drivers/espat"
"tinygo.org/x/drivers/espat/net"
"tinygo.org/x/drivers/net"
)
// change actAsAP to true to act as an access point instead of connecting to one.
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"time"
"tinygo.org/x/drivers/espat"
"tinygo.org/x/drivers/espat/net"
"tinygo.org/x/drivers/net"
)
// access point info
+2 -2
View File
@@ -17,7 +17,7 @@ import (
"time"
"tinygo.org/x/drivers/espat"
"tinygo.org/x/drivers/espat/mqtt"
"tinygo.org/x/drivers/net/mqtt"
)
// access point info
@@ -64,7 +64,7 @@ func main() {
return
}
opts := mqtt.NewClientOptions(adaptor)
opts := mqtt.NewClientOptions()
opts.AddBroker(server).SetClientID("tinygo-client-" + randomString(10))
println("Connecting to MQTT broker at", server)
+2 -2
View File
@@ -18,7 +18,7 @@ import (
"time"
"tinygo.org/x/drivers/espat"
"tinygo.org/x/drivers/espat/mqtt"
"tinygo.org/x/drivers/net/mqtt"
)
// access point info
@@ -72,7 +72,7 @@ func main() {
return
}
opts := mqtt.NewClientOptions(adaptor)
opts := mqtt.NewClientOptions()
opts.AddBroker(server).SetClientID("tinygo-client-" + randomString(10))
println("Connecting to MQTT broker at", server)
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"time"
"tinygo.org/x/drivers/espat"
"tinygo.org/x/drivers/espat/net"
"tinygo.org/x/drivers/net"
)
// access point info