module documentation

Update - Check for and install updates.

Function run Run the app and handle the update state machine.
Function start Start the app and check for updates.
Function stop Stop the app and reset the update state.
Constant STATE_CHECKING Undocumented
Constant STATE_COMPLETE Undocumented
Constant STATE_DOWNLOADING Undocumented
Constant STATE_NO_UPDATE Undocumented
Constant STATE_UPDATE_AVAILABLE Undocumented
Function __check_for_update_callback Handle the update check response.
Function __check_for_update_callback_download Handle the firmware download response.
Function __check_for_update_download_start Start the download of the update.
Function __check_for_update_is_available Check whether an update is available.
Function __check_for_update_start Start the check for update request.
Function __draw_download_complete Draw the download complete screen.
Function __draw_error Draw an error screen.
Function __draw_no_update Draw the no update available screen.
Function __draw_update_available Draw the update available screen.
Function __loading_start Start the loading animation.
Function __reset Reset the update state
Variable _board_id Undocumented
Variable _current_version Undocumented
Variable _download_complete Undocumented
Variable _download_error Undocumented
Variable _download_file_path Undocumented
Variable _download_filename Undocumented
Variable _download_started Undocumented
Variable _http Undocumented
Variable _loading Undocumented
Variable _update_info Undocumented
Variable _view_manager Undocumented
def run(view_manager):

Run the app and handle the update state machine.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
def start(view_manager) -> bool:

Start the app and check for updates.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
Returns
boolTrue if the update check started, False on failure.
def stop(view_manager):

Stop the app and reset the update state.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
STATE_CHECKING =

Undocumented

Value
const(0)
STATE_COMPLETE =

Undocumented

Value
const(4)
STATE_DOWNLOADING =

Undocumented

Value
const(3)
STATE_NO_UPDATE =

Undocumented

Value
const(2)
STATE_UPDATE_AVAILABLE =

Undocumented

Value
const(1)
def __check_for_update_callback(response, state, error):

Handle the update check response.

Parameters
response:HTTPResponseThe HTTP response.
state:intThe request state.
error:str or NoneThe request error, if any.
def __check_for_update_callback_download(response, state, error):

Handle the firmware download response.

Parameters
response:HTTPResponseThe HTTP response.
state:intThe request state.
error:str or NoneThe request error, if any.
def __check_for_update_download_start(http_context, storage) -> bool:

Start the download of the update.

Parameters
http_context:HTTPThe HTTP context for the request.
storage:StorageThe storage to save the firmware to.
Returns
boolTrue if the download started, False otherwise.
def __check_for_update_is_available(http_context) -> bool:

Check whether an update is available.

Must call __check_for_update_start first.

Parameters
http_context:HTTPThe HTTP context for the request.
Returns
boolTrue if an update is available, False otherwise.
def __check_for_update_start(http_context, view_manager) -> bool:

Start the check for update request.

Parameters
http_context:HTTPThe HTTP context for the request.
view_manager:ViewManagerThe view manager instance for display and storage access.
Returns
boolTrue if the request started, False otherwise.
def __draw_download_complete(view_manager):

Draw the download complete screen.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
def __draw_error(view_manager, message: str):

Draw an error screen.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
message:strThe error message to show.
def __draw_no_update(view_manager):

Draw the no update available screen.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
def __draw_update_available(view_manager):

Draw the update available screen.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
def __loading_start(view_manager, text: str = 'Checking...'):

Start the loading animation.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
text:strThe loading text. Defaults to "Checking...".
def __reset():

Reset the update state

_board_id: int =

Undocumented

_current_version: str =

Undocumented

_download_complete: bool =

Undocumented

_download_error: str =

Undocumented

_download_file_path: str =

Undocumented

_download_filename: str =

Undocumented

_download_started: bool =

Undocumented

_http =

Undocumented

_loading =

Undocumented

_update_info: dict =

Undocumented

_view_manager =

Undocumented