Skip to content

Commit

Permalink
Merge pull request #6 from Caffreyfans/dev
Browse files Browse the repository at this point in the history
Fix pin show error in APP
  • Loading branch information
Caffreyfans authored Aug 17, 2020
2 parents c12b7b2 + cb15b94 commit bf9d660
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 3 additions & 7 deletions src/IRbabyMsgHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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"];
Expand Down

0 comments on commit bf9d660

Please sign in to comment.