|
| #define | HP_TAB_Y 8 |
| | The overlay's layout, in pixels from the area's top left, the KST overlay's: on SERVO's left card of 620px five tabs of 95px and CLOSE of 120px in one row 48px tall, rows 48px tall at a 56px pitch, two columns of 295px, a button or value of 150px, a wide row's of 260px. Every control ends at hpn_foot().
|
| #define | HP_TAB_H UI_TAP_MIN |
| #define | HP_CLOSE_W 120 |
| #define | HP_ROW0 64 |
| #define | HP_PITCH 56 |
| #define | HP_ROW_H UI_TAP_MIN |
| #define | HP_VAL_W 150 |
| #define | HP_WIDE_W 260 |
|
#define | HP_WRITE_W 220 |
| | WRITE n VALUES, a row with no label: 22 cells, "20 WERTE
SCHREIBEN" and room.
|
|
#define | HP_FONT (&gfx_font_10x20) |
| | The face of labels, buttons, values, notes and pages' lines: the type scale's LABEL face, 10 x 20.
|
|
#define | HP_TITLE_FONT (&gfx_font_20x36) |
| | A hold page's title: the HEAD face, 20 x 36.
|
| #define | HP_CELL 10 |
| #define | HP_LINE_H 20 |
|
#define | HP_FOOT_GAP 4 |
| | The space between a control at the foot and the alert band.
|
|
#define | HP_PAGE_TOP 64 |
| | A hold page's first line: under its title, 36px from 16px, and 12px.
|
|
#define | HP_PAGE_LINES 12 |
| | The lines a hold page holds.
|
|
#define | HP_PAGE_VALUES 6 |
| | The changed values a write page lists, the count of the rest after them.
|
|
#define | HP_CHOICE_MAX 6 |
| | The entries a list holds: OVERLOAD PROTECTION's OFF and 10% to 50%.
|
|
#define | HP_ROW_COUNT 43 |
| | The rows' count.
|
|
#define | HP_FS_POSITION (-1) |
| | A D series FAILSAFE list's POSITION: its keypad follows.
|
|
#define | hp hitec_panel_h |
| | Short name for hitec_panel_h inside the overlay's files.
|
|
| enum | { K_ACT = 0
, K_SHOW
} |
| | What a row is.
|
| enum | {
A_PORT = 0
, A_SERIES
, A_READ
, A_MORE
,
A_CLEAR
, A_ENABLE
, A_RESTORE
, A_WRITE
} |
| | The actions of the SERVO tab's rows.
|
| enum | { S_D = 1
, S_C = 2
, S_ANY = 3
} |
| | The series a row is for.
|
| enum | {
P_NONE = 0
, P_TAB
, P_CLOSE
, P_ROW
,
P_KEYPAD
, P_CHOICE
, P_CHOICE_CANCEL
, P_APPLY
,
P_CANCEL
} |
| | What a press is on.
|
| enum | { C_SERIES = 0
, C_MORE
, C_RESTORE
, C_VALUE
} |
| | What a list was opened for.
|
| enum | { MORE_VOLTAGE = 0
, MORE_CURRENT
, MORE_DISCARD
, MORE_REPAIR
} |
| | The entries of MORE: the supply's in PWM, the session's while held.
|
| enum | { RS_RESTORE = 0
, RS_FORGET
} |
| | The entries of RESTORE.
|
| enum | {
W_LEAVE = 0
, W_RELEASE
, W_ENABLE
, W_WRITE
,
W_SOFT
, W_REPAIR
, W_RESTORE
} |
| | The hold pages.
|
| enum | { KP_NONE = 0
, KP_VOLTAGE
, KP_CURRENT
, KP_VALUE
} |
| | What the keypad edits.
|
|
| bool | hpn_row_shown (const hpn_row_t *r) |
| | Whether row r is on the tab shown in the series and layout in use.
|
| const hpn_row_t * | hpn_row_at (int page, int row, int col) |
| | The row at (page, row, col) shown now, or NULL.
|
| gfx_rect_t | hpn_row_rect (const hpn_row_t *r) |
| | Row r's whole rectangle.
|
| gfx_rect_t | hpn_value_rect (const hpn_row_t *r) |
| | Row r's control.
|
| gfx_rect_t | hpn_tabs_rect (void) |
| | The tabs' row.
|
| int | hpn_foot (void) |
| | Where a control at the foot ends: 8px above the area's foot, and HP_FOOT_GAP above the alert band at the most.
|
| int | hpn_notes_foot (void) |
| | Where the notes end: 6px above the area's foot, and HP_FOOT_GAP above the alert band at the most.
|
| int | hpn_cells (void) |
| | The cells of HP_FONT a note's row has: the area less 10px a side.
|
| int | hpn_text_rows (gfx_canvas_t *c, int x, int y, const char *s, gfx_color_t color) |
| | s in rows of the area's width from (x, y).
|
|
void | hpn_moved (void) |
| | The state changed or an operation started: editors that asked for the state they were opened in close and the revision counts.
|
| const char * | hpn_label (const hpn_row_t *r) |
| | A row's label as it is drawn now.
|
| void | hpn_value_text (const hpn_row_t *r, char *out, size_t n, bool *warn) |
| | The text in a row's control into out.
|
| bool | hpn_port_line (int i, char *out, size_t n) |
| | Line i of the PORT row into out.
|
| bool | hpn_port_unbound (void) |
| | Whether the PORT row names no pin: the warning colour.
|
| void | hpn_state_line (char *out, size_t n) |
| | The state line of the SERVO tab into out.
|
| void | hpn_fmt_param (uint8_t id, int32_t value, char *out, size_t n) |
| | A value of parameter id in its unit, without the stored value: "30%", "CW", "1500.00us".
|
| const char * | hpn_choice_text (uint8_t id, int32_t value) |
| | The words of a CHOICE value of id: "CW", "ON".
|
| const char * | hpn_param_label (uint8_t id) |
| | The label of parameter id's row in the series in use.
|
| void | hpn_change_line (uint8_t id, const hitec_image_t *img, char *out, size_t n) |
| | "LABEL: was -> now" of parameter id, the servo's value and img's.
|
| bool | hpn_row_edited (const hpn_row_t *r) |
| | Whether row r shows a value the draft changes.
|
|
void | hpn_close_editors (void) |
| | Every editor shut: the keypad, the list and the page.
|
| void | hpn_act (const hpn_row_t *r) |
| | The action of a SERVO row.
|
| void | hpn_choice_done (int value) |
| | The list's choice value.
|
| void | hpn_keypad_done (float v) |
| | The keypad's value v.
|
| bool | hpn_row_live (const hpn_row_t *r) |
| | Whether row r's control takes a tap now.
|
|
void | hpn_page_leave (void) |
| | The page of LEAVE.
|
|
void | hpn_page_release (void) |
| | The page of RELEASE PORT.
|
|
void | hpn_page_enable (void) |
| | The page of ENABLE WRITE TO SERVO.
|
|
void | hpn_page_write (void) |
| | The page of WRITE n VALUES.
|
|
void | hpn_page_soft (void) |
| | CHECK THIS CHANGE for the edit that waits.
|
|
void | hpn_page_repair (void) |
| | The page of REPAIR CHECKSUM.
|
|
void | hpn_page_restore (void) |
| | The page of RESTORE from the record.
|
| void | hpn_page_add (unsigned level, const char *s) |
| | Adds a line to the open page at level.
|
| void | hpn_page_open (int kind, bool danger, const char *title, const char *apply) |
| | Opens a hold page of kind.
|
| void | hpn_edit_open (const hpn_row_t *r) |
| | The editor of a value row: its list or its keypad.
|
| hitec_prog_edit_t | hpn_edit_take (int32_t value) |
| | An edit's value to the model; CHECK THIS CHANGE where it waits.
|
|
void | hpn_page_apply (void) |
| | A page's hold completed: what it asked for.
|
|
void | hpn_options_load (void) |
| | The programmer's options from the settings.
|
|
void | hpn_supply_sync (void) |
| | The supply's own controls follow the port: held, SUPPLY and the SERVO screen's SET row take an OFF and nothing else.
|
The seam between the files of the Hitec programmer's overlay.
hitec_panel.c holds the state, the rows, the geometry and the caller's side; hitec_panel_text.c the texts of the messages and the values; hitec_panel_edit.c the actions, the lists and the keypad; hitec_panel_page.c the hold pages; hitec_panel_touch.c the presses; hitec_panel_draw.c the notes and the pages drawn. The functions one calls of another are prefixed hpn_. Nothing outside these six files includes this header; the interface is hitec_panel.h.
SPDX-License-Identifier: MIT