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

The SERVO workbench's internals, which servo_screen_int.h takes in at its end: which task and which panel hold the left column, servo_workbench.c's side (the strip, the TARGET row, TEST's page), and the page area and the run cards' geometry. It reads the screen's one state s and the layout of servo_screen_int.h and is not to be included alone. More...

Go to the source code of this file.

Macros

#define RUN_CARD_X   (PAD + 10)
#define RUN_CARD_W   (LCARD_W - 20)
#define RUN_CARD_H   200
#define RUN_CARD_GAP   4
#define RUN_CARD_Y(k)
 Run card k's top (0 AUTOMATIC TEST, 1 LIMIT RUN).
#define RUN_NAME_DY   8
#define RUN_SUM_DY   32
#define RUN_BTN_DY   60
#define RUN_BTN_W   300
#define RUN_BTN_H   56
#define RUN_LINE_DY   120
#define RUN_LINE_P   22
#define RUN_SET_W   160
#define RUN_CAPS_Y   (RUN_CARD_Y(1) + RUN_CARD_H + RUN_CARD_GAP)
 The caps line under the two cards.
#define RUN_PAGE_NAME_DY   4
 A run's name on its settings, from the page's top.
#define RUN_PAGE_SAVE_DY   28
 The save line on a run's settings, under the name.

Functions

static bool modal_open (void)
static ui_wb_task_t wb_task (void)
const prog_page_set_t * prog_shown_set (void)
static bool prog_shown (void)
bool prog_holds (void)
void prog_init (void)
void prog_entry (void)
void prog_leave (void)
void prog_cancel (void)
void prog_armed (bool armed)
void prog_tick (float dt_s)
void prog_follow_hold (void)
void prog_page_follow (void)
static int rows_page (void)
static bool ov_shown (void)
static bool live_shown (void)
bool target_locked_for (setting_id_t id)
void draw_rows_page (gfx_canvas_t *c)
 A page of rows in the page area: SETTINGS' page under its tabs, or a run's settings under the run's name. Its notes, and the save line.
void wb_init (void)
 The strip, the TARGET row and PROGRAM's list laid out; LIVE.
void wb_enter (void)
void wb_leave (void)
void wb_cancel (void)
bool wb_back (void)
bool wb_down (const touch_event_t *evt)
bool wb_rest (const touch_event_t *evt)
void test_page_down (const touch_event_t *evt)
void prog_page_down (const touch_event_t *evt)
void prog_search_done (const char *text)
void draw_strip (gfx_canvas_t *c)
void draw_test_page (gfx_canvas_t *c)
 TEST: the two run cards, then the caps.
void draw_prog_page (gfx_canvas_t *c)
void draw_target (gfx_canvas_t *c)
void draw_caps_line (gfx_canvas_t *c, int x, int y)
 SUPPLY's caps in force, which a run's steps and a set point stay inside, read-only here: their home is SUPPLY > SETTINGS.
gfx_rect_t strip_area (void)
gfx_rect_t lim_start_rect (void)
 START LIMIT RUN, on the LIMIT RUN card: START TEST's place on its own card.
static gfx_rect_t page_area (void)
static gfx_rect_t run_card_rect (int k)
 Run card k.
static gfx_rect_t run_set_rect (int k)
 A card's SETTINGS, right of its START: its run's settings, one level down. Clear of CLOSE on the run's settings, which takes the top right of the page: a second tap there closes nothing.
static gfx_rect_t run_close_rect (void)
 CLOSE on a run's settings, top right in the line of the run's name: back to TEST, as the home tag goes.
static gfx_rect_t save_line_rect (void)
 The save line of a page of rows, 20px tall. On SETTINGS' pages along the bottom, under the notes; on a run's settings under the run's name, left of CLOSE, as the rows and the STALL AT note fill the page down to the alert band. The German "not saved" line is 37 cells, 370px.
static gfx_rect_t test_start_rect (void)
 START TEST, on the AUTOMATIC TEST card.

Detailed Description

The SERVO workbench's internals, which servo_screen_int.h takes in at its end: which task and which panel hold the left column, servo_workbench.c's side (the strip, the TARGET row, TEST's page), and the page area and the run cards' geometry. It reads the screen's one state s and the layout of servo_screen_int.h and is not to be included alone.

SPDX-License-Identifier: MIT

Macro Definition Documentation

◆ RUN_BTN_DY

#define RUN_BTN_DY   60

Its START's top, in it.

◆ RUN_BTN_H

#define RUN_BTN_H   56

START's height, px.

◆ RUN_BTN_W

#define RUN_BTN_W   300

START's width, px.

◆ RUN_CARD_GAP

#define RUN_CARD_GAP   4

Above and between the cards, px.

◆ RUN_CARD_H

#define RUN_CARD_H   200

A run card's height, px.

◆ RUN_CARD_W

#define RUN_CARD_W   (LCARD_W - 20)

Their width: 600px.

◆ RUN_CARD_X

#define RUN_CARD_X   (PAD + 10)

The run cards' left edge, px.

◆ RUN_CARD_Y

#define RUN_CARD_Y ( k)
Value:
#define CARD_Y
Definition balance_screen.c:44
#define k
Short name for kst_panel_k inside the overlay's seven files.
Definition kst_panel_int.h:238
#define RUN_CARD_GAP
Definition servo_workbench_int.h:136
#define RUN_CARD_H
Definition servo_workbench_int.h:135

Run card k's top (0 AUTOMATIC TEST, 1 LIMIT RUN).

◆ RUN_LINE_DY

#define RUN_LINE_DY   120

The lines under START, in it.

◆ RUN_LINE_P

#define RUN_LINE_P   22

Their pitch in SV_FONT_LABEL.

◆ RUN_NAME_DY

#define RUN_NAME_DY   8

A card's name, from its top.

◆ RUN_SET_W

#define RUN_SET_W   160

A card's SETTINGS, px.

◆ RUN_SUM_DY

#define RUN_SUM_DY   32

A card's summary line, in it.

Function Documentation

◆ draw_caps_line()

void draw_caps_line ( gfx_canvas_t * c,
int x,
int y )

SUPPLY's caps in force, which a run's steps and a set point stay inside, read-only here: their home is SUPPLY > SETTINGS.

Parameters
cthe canvas
xthe line's left edge, px
yits top, px

◆ draw_rows_page()

void draw_rows_page ( gfx_canvas_t * c)

A page of rows in the page area: SETTINGS' page under its tabs, or a run's settings under the run's name. Its notes, and the save line.

Parameters
cthe canvas

◆ draw_test_page()

void draw_test_page ( gfx_canvas_t * c)

TEST: the two run cards, then the caps.

Parameters
cthe canvas

◆ lim_start_rect()

gfx_rect_t lim_start_rect ( void )

START LIMIT RUN, on the LIMIT RUN card: START TEST's place on its own card.

Returns
the button

◆ run_card_rect()

gfx_rect_t run_card_rect ( int k)
inlinestatic

Run card k.

Parameters
k0 AUTOMATIC TEST, 1 LIMIT RUN
Returns
the card

◆ run_close_rect()

gfx_rect_t run_close_rect ( void )
inlinestatic

CLOSE on a run's settings, top right in the line of the run's name: back to TEST, as the home tag goes.

Returns
the button, 140 x UI_TAP_MIN px

◆ run_set_rect()

gfx_rect_t run_set_rect ( int k)
inlinestatic

A card's SETTINGS, right of its START: its run's settings, one level down. Clear of CLOSE on the run's settings, which takes the top right of the page: a second tap there closes nothing.

Parameters
k0 AUTOMATIC TEST, 1 LIMIT RUN
Returns
the button, RUN_SET_W x UI_TAP_MIN px

◆ save_line_rect()

gfx_rect_t save_line_rect ( void )
inlinestatic

The save line of a page of rows, 20px tall. On SETTINGS' pages along the bottom, under the notes; on a run's settings under the run's name, left of CLOSE, as the rows and the STALL AT note fill the page down to the alert band. The German "not saved" line is 37 cells, 370px.

Returns
the line

◆ test_start_rect()

gfx_rect_t test_start_rect ( void )
inlinestatic

START TEST, on the AUTOMATIC TEST card.

Returns
the button