Skip to content

Commit 95a45ce

Browse files
authored
Doc: Update deprecation of setAutoConnect, etc.. (espressif#6908)
* Doc: Update deprecation of `setAutoConnect`... ... and `getAutoConnect` * Doc: Add doc to `setAutoReconnect`.. .. and `getAutoReconnect`
1 parent 43e5e02 commit 95a45ce

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

docs/source/api/wifi.rst

+4-17
Original file line numberDiff line numberDiff line change
@@ -446,26 +446,12 @@ Return the connection state.
446446
setAutoConnect
447447
**************
448448

449-
Function used to set the automatic connection.
450-
451-
.. code-block:: arduino
452-
453-
bool setAutoConnect(bool autoConnect);
454-
455-
Where:
456-
457-
* ``bool autoConnect`` is set to ``true`` to enable this option.
449+
Function is deprecated.
458450

459451
getAutoConnect
460452
**************
461453

462-
Function used to get the automatic connection setting value.
463-
464-
.. code-block:: arduino
465-
466-
bool getAutoConnect();
467-
468-
The function will return ``true`` if the setting is enabled.
454+
Function is deprecated.
469455

470456
setAutoReconnect
471457
****************
@@ -484,11 +470,12 @@ getAutoReconnect
484470
****************
485471

486472
Function used to get the automatic reconnection if the connection is lost.
473+
487474
.. code-block:: arduino
488475
489476
bool getAutoReconnect();
490477
491-
The function will return ``true`` if this setting is enabled.
478+
The function will return ``true`` if this setting is enabled.
492479

493480
WiFiMulti
494481
---------

libraries/WiFi/src/WiFiSTA.cpp

+13-3
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,9 @@ void WiFiSTAClass::setSortMethod(wifi_sort_method_t sortMethod)
430430
}
431431

432432
/**
433-
* Setting the ESP32 station to connect to the AP (which is recorded)
433+
* Deprecated. Setting the ESP32 station to connect to the AP (which is recorded)
434434
* automatically or not when powered on. Enable auto-connect by default.
435+
* @deprecated use `setAutoReconnect`
435436
* @param autoConnect bool
436437
* @return if saved
437438
*/
@@ -441,21 +442,30 @@ bool WiFiSTAClass::setAutoConnect(bool autoConnect)
441442
}
442443

443444
/**
444-
* Checks if ESP32 station mode will connect to AP
445+
* Deprecated. Checks if ESP32 station mode will connect to AP
445446
* automatically or not when it is powered on.
447+
* @deprecated use `getAutoReconnect`
446448
* @return auto connect
447449
*/
448450
bool WiFiSTAClass::getAutoConnect()
449451
{
450452
return false;//now deprecated
451453
}
452454

455+
/**
456+
* Function used to set the automatic reconnection if the connection is lost.
457+
* @param autoReconnect `true` to enable this option.
458+
* @return true
459+
*/
453460
bool WiFiSTAClass::setAutoReconnect(bool autoReconnect)
454461
{
455462
_autoReconnect = autoReconnect;
456463
return true;
457464
}
458-
465+
/**
466+
* Function used to get the automatic reconnection if the connection is lost.
467+
* @return The function will return `true` if this setting is enabled.
468+
*/
459469
bool WiFiSTAClass::getAutoReconnect()
460470
{
461471
return _autoReconnect;

0 commit comments

Comments
 (0)