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