Skip to content

Commit 5e3189f

Browse files
committed
fix some merge errors
1 parent b76c952 commit 5e3189f

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
@@ -1070,34 +1070,26 @@ bool WiFiGenericClass::setSleep(bool enabled){
10701070
return setSleep(enabled?WIFI_PS_MIN_MODEM:WIFI_PS_NONE);
10711071
}
10721072

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

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

libraries/WiFi/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)