espat,wifinina,rtl8720dn: change ssid/pass from const to var

This commit is contained in:
sago35
2022-09-23 12:01:57 +09:00
committed by Ron Evans
parent 4061adf6db
commit 5af2512901
25 changed files with 134 additions and 116 deletions
+6 -6
View File
@@ -29,16 +29,16 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// debug = true
// server = "tinygo.org"
// }
var (
ssid string
password string
server string = "tcp://test.mosquitto.org:1883"
debug = false
ssid string
pass string
server string = "tcp://test.mosquitto.org:1883"
debug = false
)
var buf [0x400]byte
@@ -65,7 +65,7 @@ func run() error {
adaptor.Debug(debug)
adaptor.Configure()
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
+6 -6
View File
@@ -30,16 +30,16 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// debug = true
// server = "tinygo.org"
// }
var (
ssid string
password string
server string = "tcp://test.mosquitto.org:1883"
debug = false
ssid string
pass string
server string = "tcp://test.mosquitto.org:1883"
debug = false
)
var buf [0x400]byte
@@ -74,7 +74,7 @@ func run() error {
adaptor.Debug(debug)
adaptor.Configure()
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
+6 -6
View File
@@ -19,16 +19,16 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// ntpHost = "129.6.15.29"
// debug = true
// }
var (
ssid string
password string
ntpHost = "129.6.15.29"
debug = false
ssid string
pass string
ntpHost = "129.6.15.29"
debug = false
)
const NTP_PACKET_SIZE = 48
@@ -48,7 +48,7 @@ func run() error {
adaptor.Debug(debug)
adaptor.Configure()
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
+3 -3
View File
@@ -20,14 +20,14 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// serverIP = "192.168.1.119"
// debug = true
// }
var (
ssid string
password string
pass string
serverIP = ""
debug = false
)
@@ -47,7 +47,7 @@ func run() error {
adaptor.Debug(debug)
adaptor.Configure()
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
+6 -6
View File
@@ -16,17 +16,17 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// debug = true
// url = "https://www.example.com"
// test_root_ca = "..."
// }
var (
ssid string
password string
url string = "https://www.example.com"
debug = false
ssid string
pass string
url string = "https://www.example.com"
debug = false
)
// Set the test_root_ca created by the following command
@@ -76,7 +76,7 @@ func run() error {
adaptor.SetRootCA(&test_root_ca)
http.SetBuf(buf[:])
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
+6 -6
View File
@@ -16,16 +16,16 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// hubIP = "192.168.1.118"
// debug = true
// }
var (
ssid string
password string
hubIP = ""
debug = false
ssid string
pass string
hubIP = ""
debug = false
)
var buf [0x400]byte
@@ -45,7 +45,7 @@ func run() error {
http.SetBuf(buf[:])
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
@@ -21,16 +21,16 @@ import (
// If debug is enabled, a serial connection is required.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// debug = false // true
// server = "tinygo.org"
// }
var (
ssid string
password string
url = "http://tinygo.org/"
debug = false
ssid string
pass string
url = "http://tinygo.org/"
debug = false
)
var (
@@ -88,7 +88,7 @@ func run() error {
http.SetBuf(buf[:])
fmt.Fprintf(terminal, "ConnectToAP()\r\n")
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
+6 -6
View File
@@ -15,16 +15,16 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// url = "http://tinygo.org/"
// debug = true
// }
var (
ssid string
password string
url = "http://tinygo.org/"
debug = false
ssid string
pass string
url = "http://tinygo.org/"
debug = false
)
var buf [0x400]byte
@@ -45,7 +45,7 @@ func run() error {
http.UseDriver(adaptor)
http.SetBuf(buf[:])
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}
+5 -5
View File
@@ -13,14 +13,14 @@ import (
// You can override the setting with the init() in another source code.
// func init() {
// ssid = "your-ssid"
// password = "your-password"
// pass = "your-password"
// debug = true
// }
var (
ssid string
password string
debug = false
ssid string
pass string
debug = false
)
var led = machine.LED
@@ -44,7 +44,7 @@ func run() error {
http.UseDriver(adaptor)
err := adaptor.ConnectToAccessPoint(ssid, password, 10*time.Second)
err := adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second)
if err != nil {
return err
}