Skip to content

Commit b5efb47

Browse files
committed
fix some merge errors
1 parent 73911eb commit b5efb47

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

libraries/WiFi/src/WiFiGeneric.cpp

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,34 +1071,26 @@ bool WiFiGenericClass::setSleep(bool enabled){
10711071
return setSleep(enabled?WIFI_PS_MIN_MODEM:WIFI_PS_NONE);
10721072
}
10731073

1074+
/**
1075+
* control modem sleep when only in STA mode
1076+
* @param mode wifi_ps_type_t
1077+
* @return ok
1078+
*/
10741079
bool WiFiGenericClass::setSleep(wifi_ps_type_t sleepType)
10751080
{
10761081
if(sleepType != _sleepEnabled){
10771082
_sleepEnabled = sleepType;
10781083
if((getMode() & WIFI_MODE_STA) != 0){
10791084
if(esp_wifi_set_ps(_sleepEnabled) != ESP_OK){
10801085
log_e("esp_wifi_set_ps failed!");
1086+
return false;
10811087
}
10821088
}
10831089
return true;
10841090
}
10851091
return false;
10861092
}
10871093

1088-
/**
1089-
* control modem sleep when only in STA mode
1090-
* @param mode wifi_ps_type_t
1091-
* @return ok
1092-
*/
1093-
bool WiFiGenericClass::setSleep(wifi_ps_type_t mode)
1094-
{
1095-
if((getMode() & WIFI_MODE_STA) == 0){
1096-
log_w("STA has not been started");
1097-
return false;
1098-
}
1099-
return esp_wifi_set_ps(mode) == ESP_OK;
1100-
}
1101-
11021094
/**
11031095
* get modem sleep enabled
11041096
* @return true if modem sleep is enabled

libraries/WiFiProv/src/WiFiProv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ static void get_device_service_name(prov_scheme_t prov_scheme, char *service_nam
6161
}
6262
#if CONFIG_IDF_TARGET_ESP32
6363
if(prov_scheme == WIFI_PROV_SCHEME_BLE) {
64-
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_BLE, eth_mac[3], eth_mac[4], eth_mac[5]);
64+
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
6565
} else {
6666
#endif
67-
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_WIFI, eth_mac[3], eth_mac[4], eth_mac[5]);
67+
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
6868
#if CONFIG_IDF_TARGET_ESP32
6969
}
7070
#endif

0 commit comments

Comments
 (0)