mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 00:05:43 +00:00
Merge guard_ap: Guard AP-related members with USE_WIFI_AP
This commit is contained in:
@@ -237,6 +237,7 @@ class WiFiComponent : public Component {
|
|||||||
*/
|
*/
|
||||||
void set_ap(const WiFiAP &ap);
|
void set_ap(const WiFiAP &ap);
|
||||||
WiFiAP get_ap() { return this->ap_; }
|
WiFiAP get_ap() { return this->ap_; }
|
||||||
|
void set_ap_timeout(uint32_t ap_timeout) { ap_timeout_ = ap_timeout; }
|
||||||
#endif // USE_WIFI_AP
|
#endif // USE_WIFI_AP
|
||||||
|
|
||||||
void enable();
|
void enable();
|
||||||
@@ -245,7 +246,6 @@ class WiFiComponent : public Component {
|
|||||||
void start_scanning();
|
void start_scanning();
|
||||||
void check_scanning_finished();
|
void check_scanning_finished();
|
||||||
void start_connecting(const WiFiAP &ap, bool two);
|
void start_connecting(const WiFiAP &ap, bool two);
|
||||||
void set_ap_timeout(uint32_t ap_timeout) { ap_timeout_ = ap_timeout; }
|
|
||||||
|
|
||||||
void check_connecting_finished();
|
void check_connecting_finished();
|
||||||
|
|
||||||
@@ -423,7 +423,9 @@ class WiFiComponent : public Component {
|
|||||||
FixedVector<WiFiAP> sta_;
|
FixedVector<WiFiAP> sta_;
|
||||||
std::vector<WiFiSTAPriority> sta_priorities_;
|
std::vector<WiFiSTAPriority> sta_priorities_;
|
||||||
wifi_scan_vector_t<WiFiScanResult> scan_result_;
|
wifi_scan_vector_t<WiFiScanResult> scan_result_;
|
||||||
|
#ifdef USE_WIFI_AP
|
||||||
WiFiAP ap_;
|
WiFiAP ap_;
|
||||||
|
#endif
|
||||||
optional<float> output_power_;
|
optional<float> output_power_;
|
||||||
ESPPreferenceObject pref_;
|
ESPPreferenceObject pref_;
|
||||||
#ifdef USE_WIFI_FAST_CONNECT
|
#ifdef USE_WIFI_FAST_CONNECT
|
||||||
@@ -434,7 +436,9 @@ class WiFiComponent : public Component {
|
|||||||
uint32_t action_started_;
|
uint32_t action_started_;
|
||||||
uint32_t last_connected_{0};
|
uint32_t last_connected_{0};
|
||||||
uint32_t reboot_timeout_{};
|
uint32_t reboot_timeout_{};
|
||||||
|
#ifdef USE_WIFI_AP
|
||||||
uint32_t ap_timeout_{};
|
uint32_t ap_timeout_{};
|
||||||
|
#endif
|
||||||
|
|
||||||
// Group all 8-bit values together
|
// Group all 8-bit values together
|
||||||
WiFiComponentState state_{WIFI_COMPONENT_STATE_OFF};
|
WiFiComponentState state_{WIFI_COMPONENT_STATE_OFF};
|
||||||
|
|||||||
Reference in New Issue
Block a user