From bfa30e306ca132cdd5bb85cf88e067f70375f9a3 Mon Sep 17 00:00:00 2001 From: i3water <121024123@qq.com> Date: Wed, 20 Jun 2018 16:21:51 +0800 Subject: [PATCH] update version & fix MQTT pub bug --- library.json | 2 +- library.properties | 2 +- src/Adapters/BlinkerMQTT.h | 6 +++--- src/Blinker.h | 10 ++++++++++ src/Blinker/BlinkerConfig.h | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/library.json b/library.json index 6e9360d6..c4de020f 100644 --- a/library.json +++ b/library.json @@ -13,7 +13,7 @@ "type": "git", "url": "https://github.com/blinker-iot/blinker-library.git" }, - "version": "0.1.3", + "version": "0.1.4", "homepage": "https://blinker.app/", "export": { "exclude": [ diff --git a/library.properties b/library.properties index b5cdfb03..a6ada805 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Blinker -version=0.1.3 +version=0.1.4 author=i3water maintainer=i3wawter sentence=Build a easy way for your project to communicate with smartphone, work with smartphone app Blinker. diff --git a/src/Adapters/BlinkerMQTT.h b/src/Adapters/BlinkerMQTT.h index 93621f6c..dfe66fbf 100644 --- a/src/Adapters/BlinkerMQTT.h +++ b/src/Adapters/BlinkerMQTT.h @@ -671,11 +671,11 @@ void BlinkerMQTT::subscribe() { void BlinkerMQTT::print(String data) { if (*isHandle) { - bool state = STRING_contais_string(s_data, BLINKER_CMD_NOTICE); + bool state = STRING_contais_string(data, BLINKER_CMD_NOTICE); if (!state) { - state = (STRING_contais_string(s_data, BLINKER_CMD_STATE) - && STRING_contais_string(s_data, BLINKER_CMD_CONNECTED)); + state = (STRING_contais_string(data, BLINKER_CMD_STATE) + && STRING_contais_string(data, BLINKER_CMD_CONNECTED)); } if (!state) { diff --git a/src/Blinker.h b/src/Blinker.h index 44ca7a74..606b4586 100644 --- a/src/Blinker.h +++ b/src/Blinker.h @@ -29,6 +29,16 @@ #error This code is intended to run on the ESP8266/ESP32 platform! Please check your Tools->Board setting. #endif +#elif defined(BLINKER_PRO) + + #if defined(ESP8266) + #include + #elif defined(ESP32) + #include + #else + #error This code is intended to run on the ESP8266/ESP32 platform! Please check your Tools->Board setting. + #endif + #endif #endif diff --git a/src/Blinker/BlinkerConfig.h b/src/Blinker/BlinkerConfig.h index 5a94bfa7..f81fc65f 100644 --- a/src/Blinker/BlinkerConfig.h +++ b/src/Blinker/BlinkerConfig.h @@ -1,7 +1,7 @@ #ifndef BlinkerConfig_H #define BlinkerConfig_H -#define BLINKER_VERSION "0.1.3" +#define BLINKER_VERSION "0.1.4" #define BLINKER_CONNECT_TIMEOUT_MS 10000UL