|
| void | hitec_panel_init (gfx_rect_t area) |
| | Start over: closed, nothing held, laid out in area.
|
|
void | hitec_panel_screen_entry (void) |
| | The SERVO screen was entered: the options are read from the settings, and ENABLE WRITE TO SERVO goes off.
|
|
void | hitec_panel_open (void) |
| | Opens the overlay.
|
| bool | hitec_panel_is_open (void) |
| | Whether the overlay is open.
|
|
void | hitec_panel_close (void) |
| | CLOSE: closes while the port is not held; asks for LEAVE on this panel's port and for RELEASE PORT on another's.
|
|
void | hitec_panel_back (void) |
| | The home tag or BACK: an editor closes as its CANCEL does, otherwise as hitec_panel_close().
|
| bool | hitec_panel_holds_port (void) |
| | A port is held, by this panel or another session, or a request is on its way: the overlay is shown, no other row on the port opens and the bench takes no arm.
|
| uint8_t | hitec_panel_pin (void) |
| | The GPIO the port the overlay names drives.
|
| bool | hitec_panel_safe_at (int x, int y) |
| | None of the session's controls stops what the bench drives: it works on a SAFE bench only. Always false.
|
|
void | hitec_panel_leave (void) |
| | The screen is left: presses and editors go; the port stays.
|
|
void | hitec_panel_cancel (void) |
| | Touch events were lost: the press and its hold are dropped.
|
| void | hitec_panel_tick (float dt_s) |
| | One frame: the hold of a page.
|
| bool | hitec_panel_has_press (uint8_t id) |
| | Whether a press that began in the overlay is on the glass.
|
| void | hitec_panel_event (const touch_event_t *evt) |
| | A press in the overlay's area, or the rest of one it owns.
|
| void | hitec_panel_render (gfx_canvas_t *c) |
| | Draws the overlay.
|
| uint32_t | hitec_panel_revision (void) |
| | Changes whenever a render would show something else.
|
| uint32_t | hitec_panel_hold_revision (void) |
| | Changes while a page's hold fills; hitec_panel_apply_rect() is where.
|
| void | hitec_panel_feed (const hitec_prog_feed_t *f) |
| | The link task's feed for this frame.
|
| bool | hitec_panel_take (hitec_prog_cmd_t *out) |
| | The next command for the link task.
|
| void | hitec_panel_gate (hitec_prog_gate_t *g) |
| | The gate the link task claims each command at; kept over hitec_panel_init(). NULL for none.
|
| void | hitec_panel_bench_armed (bool armed) |
| | The bench is armed or asked to arm: CONNECT, READ ALL and every write are refused.
|
| size_t | hitec_panel_file_take (char *out, size_t n) |
| | The record's text for the card (hitec_prog_file_take()).
|
| void | hitec_panel_file_done (bool ok) |
| | How the card took it (hitec_prog_file_done()).
|
| bool | hitec_panel_file_load (const char *text, size_t len) |
| | The record's text as the card held it at the start (hitec_prog_file_load()).
|
| hitec_prog_t * | hitec_panel_model (void) |
| | The model.
|
| gfx_rect_t | hitec_panel_tab_rect (int page) |
| | A tab, one fifth of the row left of CLOSE, 48px tall.
|
| gfx_rect_t | hitec_panel_close_rect (void) |
| | CLOSE, 120 x 48px at the top right.
|
| gfx_rect_t | hitec_panel_value_rect (int page, int row, int col) |
| | The control of a row: a button, or the box of a value.
|
| const char * | hitec_panel_label (int page, int row, int col) |
| | The label of a row as it is drawn now.
|
| const char * | hitec_panel_value (int page, int row, int col) |
| | The text in the control of a row: a button's, or the value.
|
| bool | hitec_panel_row_live (int page, int row, int col) |
| | Whether the control of a row takes a tap now.
|
| const char * | hitec_panel_port_line (int i) |
| | Line i of the PORT row's label: 0 the port, the pin and the series, 1 the receive mode and the supply CONNECT asks.
|
| const char * | hitec_panel_note (int i) |
| | The note lines of the tab shown, from the top, the message's lines after them.
|
| gfx_rect_t | hitec_panel_notes_drawn (void) |
| | The rows the notes and the message of the tab shown take, from the first note's top to the last line's foot.
|
| int | hitec_panel_message_lines (const hitec_prog_msg_t *m, char out[HITEC_PANEL_MSG_LINES][HITEC_PANEL_LINE]) |
| | A message's lines, in the language in force.
|
| int | hitec_panel_text_rows (const char *s) |
| | The rows of 10 x 20 cells a line takes, wrapped at a space to the overlay's width less 10px a side: 60 cells on SERVO's left card.
|
| int | hitec_panel_editor (void) |
| | What is open over the page.
|
| int | hitec_panel_page (void) |
| | The tab shown.
|
| gfx_rect_t | hitec_panel_choice_rect (int i) |
| | Entry i of the open list, 48px tall at a 56px pitch.
|
| const char * | hitec_panel_choice_label (int i) |
| | The open list's entry i.
|
| gfx_rect_t | hitec_panel_choice_cancel_rect (void) |
| | A list's CANCEL, 150 x 48px at the foot's right.
|
| gfx_rect_t | hitec_panel_apply_rect (void) |
| | A hold page's button, 300 x 56px at the foot's left.
|
| gfx_rect_t | hitec_panel_cancel_rect (void) |
| | A hold page's CANCEL, 180 x 56px at the foot's right.
|
| const char * | hitec_panel_page_line (int i) |
| | Line i of the open hold page, its title first.
|
| ui_keypad_t * | hitec_panel_keypad (void) |
| | The keypad.
|
The overlay of the programmer for servos by Hitec on SERVO: its interface.
Hitec is a name or trademark of its owner; it is used here only to say which servos this overlay works with.
A session over the SERVO screen's left column, opened from its row on SERVO > PROGRAM (prog_registry.h) one level down. It draws hitec_prog.h's model and turns touches into its calls. Its controls are the screen's: tabs, rows, the number keypad, the choice list and a page whose button is held UI_HOLD_S.
Five tabs. SERVO: the port and the pin it drives, the series, the read, the programming voltage and current, CLEAR after a stop. MOTION, TRAVEL, PROTECT and INFO: the servo's values, the rows of the series in use; a decoded value shows its stored value beside it, and a stored value that fits no encoding shows raw. A writable value takes a tap: its list or the keypad edits the draft, and an edit is marked *. The SERVO tab's ENABLE WRITE TO SERVO, WRITE n VALUES and RESTORE and MORE's REPAIR CHECKSUM write to the servo, each from a page held UI_HOLD_S (hitec_prog.h).
The overlay stays open while the port is held, by this panel or by another session: PWM and programming are exclusive states of the pin, and CLOSE asks for LEAVE, or for RELEASE PORT, first.
The panel's control task owns the link. It hands this a feed every frame and takes the commands.
SPDX-License-Identifier: MIT