You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
AutoConnect/mkdocs/apiupdate.md

3.3 KiB

Constructor

AutoConnectUpdate

AutoConnectUpdate(const String& host, const uint16_t port, const String& uri, const int timeout, const uint8_t ledOn)
**Parameters**
hostUpdate server address. Specifies IP address or FQDN.
portSpecifies HTTP port for the updating process. The default is defined as the **AUTOCONNECT_UPDATE_PORT** macro in the `AutoConnectDefs.h` header file.
uriSpecifies a URI on the update server that has deployed available binary sketch files.
timeoutSpecifies the maximum response time for the update server. The default is defined as the **AUTOCONNECT_UPDATE_TIMEOUT** macro in the `AutoConnectDefs.h` header file.
ledOnActive signal to light the LED ticker during the update. Specifies **HIGH** or **LOW**

Public member functions

attach

void AutoConnectUpdate::attach(AutoConnect& portal)

Attaches the AutoConnectUpdate to the AutoConnect which constitutes the bedrock of the update process. This function creates a dialog page for the update operation as an instance of AutoConnectAux and participates in the AutoConnect menu.

**Parameter**
portalSpecifies a reference to the AutoConnect instance to attach.

disable

void AutoConnectUpdate::disable(const bool activate)

Disable the Update item in AutoConnect menu. The AutoConnect::disable function only hides the Update item from the menu, and the AutoConnectUpdate class is still active with the parameter condition. You can use the AutoConnectUpdate::enable function to appear it again in the menu.

**Parameter**
activateIf specified the **true** then the Update item will be displayed on the [AutoConnect menu](menu.md) and OTA update will be available during the WiFi status is WL_CONNECTED. For the **false**, the OTA update feature is disabled.

enable

void AutoConnectUpdate::enable(void)

Makes AutoConnectUpdate class available by incorporating the OTA update function into the AutoConnect menu. In ordinally, the AutoConnectUpdate class becomes available by just calling the AutoConnectUpdate::attach function.

handleUpdate

isEnabled

status

Public member variables

host

port

uri