adjusted downlink messge handler framework
This commit is contained in:
@@ -18,8 +18,8 @@ platform = espressif8266
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
upload_speed = 115200
|
||||
upload_port = COM5
|
||||
monitor_port = COM5
|
||||
upload_port = COM6
|
||||
monitor_port = COM6
|
||||
board_build.flash_mode = dout
|
||||
build_flags =
|
||||
-Wno-unused-function
|
||||
|
||||
@@ -153,6 +153,10 @@ void sendIrisKitHeartBeat() {
|
||||
sendRawData(g_upstream_topic.c_str(), (uint8_t*) heartBeatMessage.c_str(), heartBeatMessage.length());
|
||||
}
|
||||
|
||||
void handleIrisKitMessage(const char* data, int length) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// private function definitions
|
||||
static String buildConnect() {
|
||||
|
||||
@@ -145,7 +145,6 @@ void setup() {
|
||||
}
|
||||
|
||||
// TODO: fix the logic without settings loaded
|
||||
|
||||
INFOF("Wifi Connected, IRIS server = %s, credential token = %s\n",
|
||||
iris_server_address, iris_credential_token);
|
||||
|
||||
@@ -201,7 +200,6 @@ void factoryReset() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// private function defitions
|
||||
static void wifiReset() {
|
||||
DEBUGLN("Reset settings");
|
||||
|
||||
@@ -106,4 +106,7 @@ static void registerCallback(const char* topic, int qos) {
|
||||
|
||||
static void irisAlinkCallback(const char *topic, uint8_t *data, int length) {
|
||||
INFOF("IRIS downstream message : topic = %s, length = %d, data = %s\n", topic, length, (char*) data);
|
||||
if (NULL != g_downstream_topic.c_str() && 0 == strcmp(topic, g_downstream_topic.c_str())) {
|
||||
handleIrisKitMessage((const char*) data, length);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,4 +51,6 @@ void sendIrisKitConnect();
|
||||
|
||||
void sendIrisKitHeartBeat();
|
||||
|
||||
void handleIrisKitMessage(const char* data, int length);
|
||||
|
||||
#endif // IRBABY_IRIS_H
|
||||
Reference in New Issue
Block a user