rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
wa_page.h File Reference

The Wi-Fi page: one HTML (hypertext markup language) page with no scripts or styles from elsewhere, so it works on a phone with no other connection. More...

#include <stdbool.h>
#include <stdint.h>
#include "fw_image.h"
#include "wa_text.h"
#include "wa_walk.h"

Go to the source code of this file.

Data Structures

struct  wa_page_info_t

Macros

#define WA_URL_CODE   "/code"
#define WA_URL_UPDATE   "/update"
#define WA_URL_FILE   "/card/"
#define WA_URL_ZIP   "/card.zip"
#define WA_COOKIE   "rcbench_code"

Functions

void wa_page_code (wa_out_t *o, const wa_page_info_t *pi, bool wrong)
void wa_page_main (wa_out_t *o, const wa_page_info_t *pi, const wa_fs_t *fs)
void wa_page_upload_result (wa_out_t *o, bool de, fw_err_t e, const fw_image_info_t *info, bool same)

Detailed Description

The Wi-Fi page: one HTML (hypertext markup language) page with no scripts or styles from elsewhere, so it works on a phone with no other connection.

Two parts. Panel firmware: a file picker and an upload with progress, then the panel's answer as text; the page never starts the write, the operator does on the panel with a 2s hold. Card files: every file on the card, folder by folder, each a download, and one link for the whole card as a ZIP file with its size given before the click.

With the access code on, a browser without the code gets only the code form. Texts in English or German, as the panel's language setting.

Pure C, no ESP-IDF (Espressif Internet-of-Things Development Framework).

SPDX-License-Identifier: MIT

Macro Definition Documentation

◆ WA_COOKIE

#define WA_COOKIE   "rcbench_code"

The cookie that carries the access code.

◆ WA_URL_CODE

#define WA_URL_CODE   "/code"

The paths the page uses.

Function Documentation

◆ wa_page_code()

void wa_page_code ( wa_out_t * o,
const wa_page_info_t * pi,
bool wrong )

The code form; wrong adds that the last code was wrong.

◆ wa_page_main()

void wa_page_main ( wa_out_t * o,
const wa_page_info_t * pi,
const wa_fs_t * fs )

The whole page, with two walks of fs: one adding up, one listing.

◆ wa_page_upload_result()

void wa_page_upload_result ( wa_out_t * o,
bool de,
fw_err_t e,
const fw_image_info_t * info,
bool same )

The text an upload's response carries: e as fw_upload_end() or fw_upload_begin() gave it, and for FW_OK the version received in info, which same says is the build that runs.