From cb15b949937d78b9dddae56d8d5c38bd595f805a Mon Sep 17 00:00:00 2001 From: Caffreyfans Date: Mon, 17 Aug 2020 12:22:38 +0800 Subject: [PATCH] Fix pin show error in APP --- .travis.yml | 2 -- src/IRbabyMsgHandler.cpp | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index e85b03e..c89e70e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,6 @@ before_deploy: - cp ../.pio/build/esp8266-1m*/firmware.bin IRbaby1m.bin - cp ../.pio/build/esp8266-2m*/firmware.bin IRbaby2m.bin - cp ../.pio/build/esp8266-4m*/firmware.bin IRbaby4m.bin - - wget irbaby.caffreyfans.top/tools/FlashESP8266.exe - - wget irbaby.caffreyfans.top/tools/esptool.exe - zip -q IRbaby.zip * deploy: diff --git a/src/IRbabyMsgHandler.cpp b/src/IRbabyMsgHandler.cpp index 33828c8..7aa1220 100644 --- a/src/IRbabyMsgHandler.cpp +++ b/src/IRbabyMsgHandler.cpp @@ -33,7 +33,7 @@ bool msgHandle(StaticJsonDocument<1024> *p_recv_msg_doc, MsgType msg_type) { String chip_id = String(ESP.getChipId(), HEX); chip_id.toUpperCase(); - send_msg_doc["cmd"] = "upload"; + send_msg_doc["cmd"] = "query_discovery"; send_msg_doc["params"]["ip"] = WiFi.localIP().toString(); send_msg_doc["params"]["mac"] = chip_id; @@ -42,15 +42,11 @@ bool msgHandle(StaticJsonDocument<1024> *p_recv_msg_doc, MsgType msg_type) send_msg_doc["params"]["mqtt"] = ConfigData["mqtt"]; } - if (ConfigData.containsKey("send_pin")) + if (ConfigData.containsKey("pin")) { - send_msg_doc["params"]["send_pin"] = ConfigData["send_pin"]; + send_msg_doc["params"]["pin"]= ConfigData["pin"]; } - if (ConfigData.containsKey("receive_pin")) - { - send_msg_doc["params"]["receive_pin"] = ConfigData["receive_pin"]; - } if (ConfigData.containsKey("version")) { send_msg_doc["params"]["version"] = ConfigData["version"];