|
| #define | TAB_Y 8 |
| | The overlay's layout, in pixels from the area's top left. Every width that is not a control's own comes from the area's width.
|
| #define | TAB_H UI_TAP_MIN |
| #define | CLOSE_W 120 |
| #define | ROW0 64 |
| #define | PITCH 56 |
| #define | ROW_H UI_TAP_MIN |
| #define | VAL_W 150 |
| #define | WIDE_W 260 |
| #define | STEP_W 56 |
| #define | KP_FONT (&gfx_font_10x20) |
| | The faces: KP_FONT, the type scale's LABEL face (10 x 20), for the labels, the buttons, the notes and the warning pages' lines; KP_TITLE_FONT, the HEAD face (20 x 36), for a warning page's title. LINE_H is a wrapped row's pitch in KP_FONT and KP_CELL its cell's width.
|
| #define | KP_TITLE_FONT (&gfx_font_20x36) |
| #define | KP_CELL 10 |
| #define | LINE_H 20 |
|
#define | FOOT_GAP 4 |
| | The space between the bottom of a control at the foot and the alert band's top: 4px, as every screen's footer.
|
| #define | REPEAT_DELAY_S 0.45f |
| #define | REPEAT_SLOW_HZ 8.0f |
| #define | REPEAT_FAST_S 1.8f |
| #define | REPEAT_FAST_HZ 30.0f |
|
#define | ROW_COUNT 33 |
| | The rows of the five pages, in kst_panel.c, and their count.
|
| #define | FILES_SAVE (-1) |
|
#define | FILES_NEXT (-2) |
| | List entry value: the entry that pages on to the files behind these.
|
|
#define | RESTORE_FORGET ((int)KST_PROG_FROM_COUNT) |
| | List value of a restore's source list that forgets the restore.
|
| #define | KP_VOLTAGE (-1) |
|
#define | KP_CURRENT (-2) |
| | Keypad target: the supply current limit an ENTER asks for.
|
| #define | KP_WAIT (-3) |
|
#define | CHOICE_MAX 7 |
| | The entries a list holds: the fullest, FILES, has KST_PROG_FILES_MAX files between the entry that saves and the one that pages on; 7 rows of ROW_H at PITCH fit above CANCEL on SERVO's left card.
|
|
#define | WARN_LINES 12 |
| | Lines a warning page holds, WARN_LINES of KST_PANEL_LINE bytes.
|
|
#define | WARN_ROWS 16 |
| | The rows a page's lines take at most, wrapped to the page's width: 16 rows at LINE_H take 320px of the 356px from WARN_TOP to 8px above the buttons on SERVO's left card. A shorter area takes fewer (kpn_warn_room()).
|
|
#define | WARN_RULES 7 |
| | Lines of a warning page given to the soft limits' warnings.
|
|
#define | FILE_VALUES 4 |
| | Lines of a file's page given to its values.
|
|
#define | WARN_TOP 64 |
| | A warning page's first line under the area's top: the title in KP_TITLE_FONT from 16px, 36px tall, and 12px.
|
|
#define | k kst_panel_k |
| | Short name for kst_panel_k inside the overlay's seven files.
|
|
| enum | {
PG_SERVO = 0
, PG_TUNE
, PG_PULSE
, PG_FAILSAFE
,
PG_LOCKED
, PG_COUNT
} |
| enum | { K_FIELD = 0
, K_STEP
, K_LOCKED
, K_ACT
} |
| enum | {
A_PORT = 0
, A_READ
, A_FILES
, A_RESTORE
,
A_MORE
, A_ENABLE
, A_WRITE
} |
| enum | {
P_NONE = 0
, P_TAB
, P_CLOSE
, P_ROW
,
P_MINUS
, P_PLUS
, P_KEYPAD
, P_CHOICE
,
P_CHOICE_CANCEL
, P_APPLY
, P_CANCEL
, P_TEXTKEY
,
P_NOTES
} |
| enum | { C_STRETCH = 0
, C_RESTORE
, C_MORE
, C_FILES
} |
| enum | {
MORE_VERIFY = 0
, MORE_DISCARD
, MORE_RELEASE
, MORE_VOLTAGE
,
MORE_CURRENT
, MORE_WAIT
} |
| enum | {
W_SOFT = 0
, W_ENABLE
, W_WRITE
, W_RESTORE
,
W_RELEASE
, W_LEAVE
, W_CHECK
, W_HV
} |
|
| ui_text_id_t | kpn_card_text_id (ui_card_at_t at) |
| | The card's words for at, for the slot as the feed says it.
|
| const char * | kpn_card_tr (ui_card_at_t at) |
| | The same words, translated.
|
| unsigned | kpn_ones (uint64_t v) |
| | The bits set in v.
|
| uint8_t | kpn_port_no (void) |
| | The programming port the overlay works on: the SERVO screen's target, and the first port while that is the servo outputs.
|
| bool | kpn_on_port (void) |
| | Whether the SERVO screen's tester drives a programming port.
|
| bool | kpn_flag (uint16_t f) |
| | Whether flag f is set in the port's report.
|
| bool | kpn_programming (void) |
| | Whether the port is in programming.
|
| unsigned | kpn_servo_type (void) |
| | The servo's type as the card names it; 0 without a servo.
|
| const char * | kpn_row_label (const row_t *r) |
| | A row's label: its text, or for PORT and SERVO what they hold now.
|
| const char * | kpn_field_name (unsigned id) |
| | The name a field has on its row; NULL for one without a row.
|
| bool | kpn_in_set (kst_field_set_t set, unsigned id) |
| | Whether field id is in set.
|
| const char * | kpn_unit_of (kst_field_id_t id) |
| | A field's unit as its value shows it; "" for none.
|
| int | kpn_decimals_of (kst_field_id_t id) |
| | Digits after the point a field's displayed value has.
|
| void | kpn_fmt_value (kst_field_id_t id, uint16_t raw, char *out, size_t n, bool unit) |
| | A field's value as its row shows it.
|
| void | kpn_fmt_field (kst_field_id_t id, uint16_t raw, char *out, size_t n) |
| | kpn_fmt_value() with the unit.
|
| bool | kpn_changed (kst_field_id_t id) |
| | Whether the draft holds another value of id than the servo.
|
| int | kpn_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, a row each LINE_H.
|
| gfx_rect_t | kpn_tabs_rect (void) |
| | The tabs.
|
| int | kpn_foot (void) |
| | Where a control at the area's foot ends.
|
| int | kpn_notes_foot (void) |
| | Where the notes and the message under a page end.
|
| gfx_rect_t | kpn_row_rect (const row_t *r) |
| | Row r, its label and its control.
|
| gfx_rect_t | kpn_value_rect (const row_t *r) |
| | Row r's value, between its keys where it has them.
|
| gfx_rect_t | kpn_step_rect (const row_t *r, bool up) |
| | Row r's plus key (up) or minus key.
|
| const row_t * | kpn_row_at (int page, int row, int col) |
| | The row at (row, col) of page page, or NULL.
|
| const char * | kpn_shown (const char *name) |
| | A file name as a line shows it: whole up to KST_PANEL_NAME_TYPED characters, else its start and "..".
|
| void | kpn_stay_line (char *out, unsigned n) |
| | Into out, KST_PANEL_LINE bytes: how many values stay as they are, n.
|
| void | kpn_journal_line (char *out, int text, unsigned arg) |
| | Into out: a line of the interrupted write's record, the GPIO or the port of kst_prog_journal_arg() in arg.
|
| void | kpn_kind_line (char *out, int text) |
| | Into out: what an edited file is, with the fields it gives a value for where the card's side counted them.
|
| void | kpn_write_n (char *out, size_t size, unsigned n) |
| | Into out, size bytes: the title of a write of n values.
|
| int | kpn_warn_rows (void) |
| | The rows the page's lines take.
|
| int | kpn_warn_room (void) |
| | The rows a warning page's lines may take in the area: those that fit between WARN_TOP and 8px above the buttons, WARN_ROWS at most; 14 in an area 420px tall.
|
| void | kpn_warn_soft (const row_t *r) |
| | The page of an edit of row r that passes a soft limit.
|
|
void | kpn_warn_enable (void) |
| | The page of ENABLE WRITE TO SERVO.
|
|
void | kpn_warn_file (void) |
| | The page of a file whose values pass soft limits: its warnings, and the draft takes it after the hold.
|
|
void | kpn_warn_write (void) |
| | The page of WRITE: the values, the horn and the card.
|
| ui_text_id_t | kpn_from_text (unsigned from) |
| | The words for where a restore's values come from.
|
| void | kpn_warn_restore (const kst_prog_restore_t *plan) |
| | The page of a restore by plan.
|
| void | kpn_warn_check (const kst_prog_restore_t *plan) |
| | The page of a backup whose values pass soft limits the servo keeps: its warnings first, the restore's page after the hold.
|
|
void | kpn_warn_release (void) |
| | The page of RELEASE.
|
|
void | kpn_warn_leave (void) |
| | The page of the way back to PWM, with and without a PD mini.
|
| void | kpn_warn_hv (uint16_t mv) |
| | The page of a programming voltage mv, mV, above what a standard servo is rated for.
|
|
void | kpn_warn_apply (void) |
| | The hold completed: what the page asked for.
|
|
void | kpn_close_editors (void) |
| | Every editor shut: the keypad, the keyboard, the list and the page; a soft limit's edit is cancelled.
|
| void | kpn_name_done (const char *name) |
| | A file's name typed: the save, or the keyboard again for a name the card's side does not take.
|
|
void | kpn_card_moved (void) |
| | What the card's side brought: the list, the name again, a file's warnings.
|
| void | kpn_edit_field (const row_t *r) |
| | Row r's editor: a toggle, the list or the keypad.
|
|
void | kpn_options_keep (void) |
| | The programmer's options into the settings.
|
|
void | kpn_options_load (void) |
| | The programmer's options from the settings.
|
| void | kpn_keypad_done (float v) |
| | The keypad's value v for the row or the supply it edits.
|
| void | kpn_step (const row_t *r, bool up) |
| | One step of a plus (up) or minus key on row r.
|
| bool | kpn_leave_waits (const kst_prog_t *p) |
| | Whether a LEAVE's wait runs: an abort keeps the session.
|
| void | kpn_act (const row_t *r) |
| | The action of row r of the SERVO page.
|
| void | kpn_choice_done (int value) |
| | The list's choice value for what the list was opened for.
|
| bool | kpn_row_live (const row_t *r) |
| | Whether row r's control takes a tap now.
|
|
void | kpn_supply_sync (void) |
| | The supply's own controls follow the port: while one is out of PWM they offer an OFF and nothing else.
|
| bool | kpn_notes_paged_at (int x, int y) |
| | Whether (x, y) is on notes that take more than one page.
|
The seam between the files of the KST and Chaservo programmer's overlay.
The private seam between the files of the programmer's overlay for KST and Chaservo servos: kst_panel.c, the state, the rows, the helpers and the caller's side; kst_panel_text.c, the texts of the messages; kst_panel_warn.c, the warning pages; kst_panel_edit.c, the editors and the actions; kst_panel_touch.c, the presses; kst_panel_run.c, the limit run's sessions; and kst_panel_draw.c, the notes and the pages drawn. The layout they draw on, the rows, the state they read and write, and the functions one calls of another, prefixed kpn_. Nothing outside these seven files includes this header; the interface is kst_panel.h.
SPDX-License-Identifier: MIT