|
@@ -2,6 +2,7 @@ package protocol
|
|
|
|
|
|
import (
|
|
|
"errors"
|
|
|
+ "fmt"
|
|
|
"strings"
|
|
|
)
|
|
|
|
|
@@ -110,7 +111,9 @@ func parseLast(topics []string) (topicInfo *TopicInfo, err error) {
|
|
|
}
|
|
|
|
|
|
func GetCommandTopic(deviceCode, productKey string) string {
|
|
|
- return strings.Join([]string{TopicHeadThing, "down", "command", productKey, deviceCode}, "/")
|
|
|
+ topic := strings.Join([]string{TopicHeadThing, "down", "command", productKey, deviceCode}, "/")
|
|
|
+ fmt.Printf("topic:%s", topic)
|
|
|
+ return topic
|
|
|
}
|
|
|
|
|
|
func getDirection(dir string) Direction {
|