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

ESC STICK as a page set (prog_registry.h): the session's frame. More...

#include "esc_stick_panel.h"
#include <string.h>
#include "esc_stick_int.h"
#include "ui_text.h"
#include "ui_theme.h"

Functions

int esc_stick_panel_stage (void)
static void esc_stick_ps_init (gfx_rect_t area)
 Start over: closed, nothing held, every control in its place.
static uint32_t showing (void)
static void press_at (const touch_event_t *evt)
static void tap_follow (const touch_event_t *evt)
static void esc_stick_ps_event (const touch_event_t *evt)
static void esc_stick_ps_entry (void)
static void esc_stick_ps_open (void)
static bool esc_stick_ps_is_open (void)
static void esc_stick_ps_back (void)
static bool esc_stick_ps_holds (void)
static void esc_stick_ps_armed (bool armed)
static void esc_stick_ps_tick (float dt_s)
static bool esc_stick_ps_has_press (uint8_t id)
static void esc_stick_ps_render (gfx_canvas_t *c)
static uint32_t esc_stick_ps_revision (void)
static uint32_t esc_stick_ps_hold_revision (void)
static gfx_rect_t esc_stick_ps_hold_rect (void)
static void esc_stick_ps_leave (void)
static void esc_stick_ps_cancel (void)
static uint8_t esc_stick_ps_pin (void)
static bool esc_stick_ps_safe_at (int x, int y)

Variables

stick_shared_t pg
const prog_page_set_t esc_stick_pages

Detailed Description

ESC STICK as a page set (prog_registry.h): the session's frame.

ESC STICK as a page set (prog_registry.h): the session MOTOR & ESC opens from the STICK MENU row of PROGRAM's list, full width.

This file is the session's frame: the state the pages share (pg), the controls in their places, the tap walk every control but three acts through, the way back one level at a time, and the hooks the host calls. The pages themselves are esc_stick_panel.c's; the layout and the walk's rules are esc_stick_int.h's.

The session draws from PROG_FULL_Y down; the host draws the output strip above it. It holds no programming port, so it never holds the host's way out: leaving MOTOR & ESC ends a run, switches the bench to SAFE and closes the session.

SPDX-License-Identifier: MIT

Function Documentation

◆ esc_stick_panel_stage()

int esc_stick_panel_stage ( void )

Where the session is, for tests: closed, on the list, or on a profile's page (esc_stick_int.h's STAGE_*).

◆ esc_stick_ps_init()

void esc_stick_ps_init ( gfx_rect_t area)
static

Start over: closed, nothing held, every control in its place.

Parameters
areaThe body under the output strip; the pages' layout is fixed to it (esc_stick_int.h).

Variable Documentation

◆ esc_stick_pages

const prog_page_set_t esc_stick_pages
Initial value:
= {
.entry = esc_stick_ps_entry,
.open = esc_stick_ps_open,
.is_open = esc_stick_ps_is_open,
.back = esc_stick_ps_back,
.holds_port = esc_stick_ps_holds,
.armed = esc_stick_ps_armed,
.tick = esc_stick_ps_tick,
.has_press = esc_stick_ps_has_press,
.event = esc_stick_ps_event,
.render = esc_stick_ps_render,
.revision = esc_stick_ps_revision,
.hold_revision = esc_stick_ps_hold_revision,
.hold_rect = esc_stick_ps_hold_rect,
.leave = esc_stick_ps_leave,
.cancel = esc_stick_ps_cancel,
.pin = esc_stick_ps_pin,
.safe_at = esc_stick_ps_safe_at,
}
static void esc_stick_ps_init(gfx_rect_t area)
Start over: closed, nothing held, every control in its place.
Definition esc_stick_pages.c:42

The page set MOTOR & ESC opens: the registry's STICK MENU row.