Skip to content

Commit

Permalink
Fix setup error
Browse files Browse the repository at this point in the history
  • Loading branch information
Caffreyfans committed Oct 30, 2020
1 parent b6bdb19 commit a7647f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/IRbaby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ void setup()
pinMode(RESET_PIN, INPUT_PULLUP);
pinMode(0, OUTPUT);
digitalWrite(0, LOW);
pinMode(2, OUTPUT);
digitalWrite(0, LOW);
attachInterrupt(digitalPinToInterrupt(RESET_PIN), resetHandle, ONLOW);
INFOLN();
INFOLN("8888888 8888888b. 888 888 ");
Expand Down
5 changes: 3 additions & 2 deletions src/IRbabyha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ void registAC(String filename, bool flag)
device["model"] = "ESP8266";
device["sw_version"] = "IRbaby " + String(FIRMWARE_VERSION);
}
serializeJson(send_msg_doc, reg_content);
if (flag) {
serializeJson(send_msg_doc, reg_content);
}
DEBUGLN(reg_topic_head);
DEBUGLN(reg_content);
mqttPublishRetained(reg_topic_head, reg_content);
}

0 comments on commit a7647f3

Please sign in to comment.