Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Fix API Server has deep sleep (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter authored Jan 13, 2019
1 parent 5361e46 commit 903d41e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/esphomelib/api/api_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ void APIConnection::on_device_info_request_(const DeviceInfoRequest &req) {
buffer.encode_string(6, ARDUINO_BOARD);
#endif
#ifdef USE_DEEP_SLEEP
// bool has_deep_sleep = 8;
buffer.encode_bool(8, global_has_deep_sleep);
// bool has_deep_sleep = 7;
buffer.encode_bool(7, global_has_deep_sleep);
#endif
}, APIMessageType::DEVICE_INFO_RESPONSE);
}
Expand Down
3 changes: 2 additions & 1 deletion src/esphomelib/wifi_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ void WiFiComponent::setup() {
this->wifi_apply_power_save_();

if (this->fast_connect_) {
this->start_connecting(this->sta_[0], false);
this->selected_ap_ = this->sta_[0];
this->start_connecting(this->selected_ap_, false);
} else {
this->start_scanning();
}
Expand Down

0 comments on commit 903d41e

Please sign in to comment.