Skip to content

adds getautoreconnect() #4359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ bool ESP8266WiFiSTAClass::setAutoReconnect(bool autoReconnect) {
return wifi_station_set_reconnect_policy(autoReconnect);
}

/**
* get whether reconnect or not when the ESP8266 station is disconnected from AP.
* @return autoreconnect
*/
bool ESP8266WiFiSTAClass::getAutoReconnect() {
return wifi_station_get_reconnect_policy();
}

/**
* Wait for WiFi connection to reach a result
* returns the status reached or disconnect if STA is off
Expand Down
1 change: 1 addition & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiSTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class ESP8266WiFiSTAClass {
bool getAutoConnect();

bool setAutoReconnect(bool autoReconnect);
bool getAutoReconnect();

uint8_t waitForConnectResult();

Expand Down
1 change: 1 addition & 0 deletions tools/sdk/include/user_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ uint8 wifi_station_get_auto_connect(void);
bool wifi_station_set_auto_connect(uint8 set);

bool wifi_station_set_reconnect_policy(bool set);
bool wifi_station_get_reconnect_policy();

typedef enum {
STATION_IDLE = 0,
Expand Down