1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-14 09:12:19 +01:00

esp32_improv add timeout (#5556)

This commit is contained in:
Jesse Hills
2023-10-19 11:42:52 +13:00
committed by GitHub
parent 10c89771e3
commit a8667b680e
3 changed files with 17 additions and 7 deletions

View File

@@ -51,6 +51,9 @@ class ESP32ImprovComponent : public Component, public BLEServiceComponent {
void set_identify_duration(uint32_t identify_duration) { this->identify_duration_ = identify_duration; }
void set_authorized_duration(uint32_t authorized_duration) { this->authorized_duration_ = authorized_duration; }
void set_wifi_timeout(uint32_t wifi_timeout) { this->wifi_timeout_ = wifi_timeout; }
uint32_t get_wifi_timeout() const { return this->wifi_timeout_; }
protected:
bool should_start_{false};
bool setup_complete_{false};
@@ -60,6 +63,8 @@ class ESP32ImprovComponent : public Component, public BLEServiceComponent {
uint32_t authorized_start_{0};
uint32_t authorized_duration_;
uint32_t wifi_timeout_{};
std::vector<uint8_t> incoming_data_;
wifi::WiFiAP connecting_sta_;