Skip to content

fix WiFi mode change typo #1334

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 1 commit into from
Dec 30, 2015
Merged
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
4 changes: 2 additions & 2 deletions libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ bool ESP8266WiFiGenericClass::enableSTA(bool enable) {

if(isEnabled != enable) {
if(enable) {
return mode((WiFiMode_t)(currentMode & WIFI_STA));
return mode((WiFiMode_t)(currentMode | WIFI_STA));
} else {
return mode((WiFiMode_t)(currentMode & (~WIFI_STA)));
}
Expand All @@ -251,7 +251,7 @@ bool ESP8266WiFiGenericClass::enableAP(bool enable){

if(isEnabled != enable) {
if(enable) {
return mode((WiFiMode_t)(currentMode & WIFI_AP));
return mode((WiFiMode_t)(currentMode | WIFI_AP));
} else {
return mode((WiFiMode_t)(currentMode & (~WIFI_AP)));
}
Expand Down