.
This commit is contained in:
parent
daa3e0660d
commit
cf09ee5fe9
11
GPIO/GPIO.go
11
GPIO/GPIO.go
|
@ -6,6 +6,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
|
@ -150,7 +151,7 @@ func LoadConfig(path string) {
|
|||
}
|
||||
func main() {
|
||||
// Bat debug
|
||||
//mqtt.DEBUG = log.New(os.Stderr, "DEBUG ", log.Ltime)
|
||||
mqtt.DEBUG = log.New(os.Stderr, "DEBUG ", log.Ltime)
|
||||
fmt.Println("======== START MAIN ==========")
|
||||
time.Sleep(1 * time.Second)
|
||||
if state_read_ecf == false {
|
||||
|
@ -232,10 +233,10 @@ func mqtt_begin() {
|
|||
}
|
||||
}
|
||||
|
||||
opts_cms_bi.OnConnect = func(c mqtt.Client) {
|
||||
fmt.Printf("Client connected, subscribing to: " + CMS_TOPIC_IN)
|
||||
c.Subscribe(CMS_TOPIC_IN, 0, mqtt_messageHandler)
|
||||
}
|
||||
// opts_cms_bi.OnConnect = func(c mqtt.Client) {
|
||||
// fmt.Printf("Client connected, subscribing to: " + CMS_TOPIC_IN)
|
||||
// c.Subscribe(CMS_TOPIC_IN, 0, mqtt_messageHandler)
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user