mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 18:27:15 +02:00
fix some merge errors
This commit is contained in:
@ -1070,6 +1070,11 @@ bool WiFiGenericClass::setSleep(bool enabled){
|
||||
return setSleep(enabled?WIFI_PS_MIN_MODEM:WIFI_PS_NONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* control modem sleep when only in STA mode
|
||||
* @param mode wifi_ps_type_t
|
||||
* @return ok
|
||||
*/
|
||||
bool WiFiGenericClass::setSleep(wifi_ps_type_t sleepType)
|
||||
{
|
||||
if(sleepType != _sleepEnabled){
|
||||
@ -1077,6 +1082,7 @@ bool WiFiGenericClass::setSleep(wifi_ps_type_t sleepType)
|
||||
if((getMode() & WIFI_MODE_STA) != 0){
|
||||
if(esp_wifi_set_ps(_sleepEnabled) != ESP_OK){
|
||||
log_e("esp_wifi_set_ps failed!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -1084,20 +1090,6 @@ bool WiFiGenericClass::setSleep(wifi_ps_type_t sleepType)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* control modem sleep when only in STA mode
|
||||
* @param mode wifi_ps_type_t
|
||||
* @return ok
|
||||
*/
|
||||
bool WiFiGenericClass::setSleep(wifi_ps_type_t mode)
|
||||
{
|
||||
if((getMode() & WIFI_MODE_STA) == 0){
|
||||
log_w("STA has not been started");
|
||||
return false;
|
||||
}
|
||||
return esp_wifi_set_ps(mode) == ESP_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* get modem sleep enabled
|
||||
* @return true if modem sleep is enabled
|
||||
|
@ -61,10 +61,10 @@ static void get_device_service_name(prov_scheme_t prov_scheme, char *service_nam
|
||||
}
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
if(prov_scheme == WIFI_PROV_SCHEME_BLE) {
|
||||
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_BLE, eth_mac[3], eth_mac[4], eth_mac[5]);
|
||||
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
|
||||
} else {
|
||||
#endif
|
||||
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_WIFI, eth_mac[3], eth_mac[4], eth_mac[5]);
|
||||
snprintf(service_name, max, "%s%02X%02X%02X",SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user