42#define HP_TAB_H UI_TAP_MIN
46#define HP_ROW_H UI_TAP_MIN
54#define HP_FONT (&gfx_font_10x20)
56#define HP_TITLE_FONT (&gfx_font_20x36)
65#define HP_PAGE_LINES 12
68#define HP_PAGE_VALUES 6
71#define HP_CHOICE_MAX 6
74enum { K_ACT = 0, K_SHOW };
77enum { A_PORT = 0, A_SERIES, A_READ, A_MORE, A_CLEAR, A_ENABLE, A_RESTORE,
81enum { S_D = 1, S_C = 2, S_ANY = 3 };
97#define HP_ROW_COUNT 43
105 P_NONE = 0, P_TAB, P_CLOSE, P_ROW, P_KEYPAD, P_CHOICE, P_CHOICE_CANCEL,
110enum { C_SERIES = 0, C_MORE, C_RESTORE, C_VALUE };
113enum { MORE_VOLTAGE = 0, MORE_CURRENT, MORE_DISCARD, MORE_REPAIR };
115enum { RS_RESTORE = 0, RS_FORGET };
117#define HP_FS_POSITION (-1)
119enum { W_LEAVE = 0, W_RELEASE, W_ENABLE, W_WRITE, W_SOFT, W_REPAIR,
174#define hp hitec_panel_h
289void hpn_fmt_param(uint8_t
id, int32_t value,
char *out,
size_t n);
#define s
Short name for esc_stick_s inside the five stick-class files.
Definition esc_stick_panel_int.h:295
gfx: an RGB565 (16-bit red, green, blue) rasteriser with no dependencies.
gfx_rect_t hpn_tabs_rect(void)
The tabs' row.
Definition hitec_panel.c:159
const hpn_row_t * hpn_row_at(int page, int row, int col)
The row at (page, row, col) shown now, or NULL.
Definition hitec_panel.c:144
gfx_rect_t hpn_row_rect(const hpn_row_t *r)
Row r's whole rectangle.
Definition hitec_panel.c:183
void hpn_moved(void)
The state changed or an operation started: editors that asked for the state they were opened in close...
Definition hitec_panel.c:503
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 ...
Definition hitec_panel.c:167
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).
Definition hitec_panel.c:259
hpn_state_t hitec_panel_h
The state, in hitec_panel.c; the files read it as hp.
Definition hitec_panel.c:122
gfx_rect_t hpn_value_rect(const hpn_row_t *r)
Row r's control.
Definition hitec_panel.c:194
bool hpn_row_shown(const hpn_row_t *r)
Whether row r is on the tab shown in the series and layout in use.
Definition hitec_panel.c:129
const hpn_row_t hpn_rows[]
The rows of every tab and both series; hitec_panel_int.h.
Definition hitec_panel.c:33
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.
Definition hitec_panel.c:175
int hpn_cells(void)
The cells of HP_FONT a note's row has: the area less 10px a side.
Definition hitec_panel.c:205
The overlay of the programmer for servos by Hitec on SERVO: its interface.
#define HITEC_PANEL_LINE
The bytes of one line of a message, a note or a page.
Definition hitec_panel.h:53
void hpn_act(const hpn_row_t *r)
The action of a SERVO row.
Definition hitec_panel_edit.c:381
void hpn_close_editors(void)
Every editor shut: the keypad, the list and the page.
Definition hitec_panel_edit.c:32
void hpn_keypad_done(float v)
The keypad's value v.
Definition hitec_panel_edit.c:518
hitec_prog_edit_t hpn_edit_take(int32_t value)
An edit's value to the model; CHECK THIS CHANGE where it waits.
Definition hitec_panel_edit.c:104
void hpn_edit_open(const hpn_row_t *r)
The editor of a value row: its list or its keypad.
Definition hitec_panel_edit.c:198
void hpn_options_load(void)
The programmer's options from the settings.
Definition hitec_panel_edit.c:89
void hpn_choice_done(int value)
The list's choice value.
Definition hitec_panel_edit.c:469
bool hpn_row_live(const hpn_row_t *r)
Whether row r's control takes a tap now.
Definition hitec_panel_edit.c:265
void hpn_page_release(void)
The page of RELEASE PORT.
Definition hitec_panel_page.c:59
const char * hpn_choice_text(uint8_t id, int32_t value)
The words of a CHOICE value of id: "CW", "ON".
Definition hitec_panel_text.c:66
void hpn_page_write(void)
The page of WRITE n VALUES.
Definition hitec_panel_page.c:153
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.
Definition hitec_panel_text.c:224
void hpn_page_restore(void)
The page of RESTORE from the record.
Definition hitec_panel_page.c:249
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....
Definition hitec_panel_text.c:177
void hpn_page_add(unsigned level, const char *s)
Adds a line to the open page at level.
Definition hitec_panel_page.c:38
void hpn_page_repair(void)
The page of REPAIR CHECKSUM.
Definition hitec_panel_page.c:231
bool hpn_port_unbound(void)
Whether the PORT row names no pin: the warning colour.
Definition hitec_panel_text.c:354
void hpn_page_enable(void)
The page of ENABLE WRITE TO SERVO.
Definition hitec_panel_page.c:185
void hpn_state_line(char *out, size_t n)
The state line of the SERVO tab into out.
Definition hitec_panel_text.c:500
void hpn_page_apply(void)
A page's hold completed: what it asked for.
Definition hitec_panel_page.c:262
const char * hpn_label(const hpn_row_t *r)
A row's label as it is drawn now.
Definition hitec_panel_text.c:43
void hpn_page_soft(void)
CHECK THIS CHANGE for the edit that waits.
Definition hitec_panel_page.c:203
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 an...
Definition hitec_panel_touch.c:216
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.
Definition hitec_panel_text.c:314
#define HP_ROW_COUNT
The rows' count.
Definition hitec_panel_int.h:97
bool hpn_port_line(int i, char *out, size_t n)
Line i of the PORT row into out.
Definition hitec_panel_text.c:381
#define HP_CHOICE_MAX
The entries a list holds: OVERLOAD PROTECTION's OFF and 10% to 50%.
Definition hitec_panel_int.h:71
void hpn_page_leave(void)
The page of LEAVE.
Definition hitec_panel_page.c:47
bool hpn_row_edited(const hpn_row_t *r)
Whether row r shows a value the draft changes.
Definition hitec_panel_text.c:235
const char * hpn_param_label(uint8_t id)
The label of parameter id's row in the series in use.
Definition hitec_panel_text.c:189
void hpn_page_open(int kind, bool danger, const char *title, const char *apply)
Opens a hold page of kind.
Definition hitec_panel_page.c:26
#define HP_PAGE_LINES
The lines a hold page holds.
Definition hitec_panel_int.h:65
The programmer for servos by Hitec as the SERVO screen runs it: the session with one servo,...
hitec_prog_state_t
Where the programmer is.
Definition hitec_prog.h:127
hitec_prog_edit_t
What an edit came to.
Definition hitec_prog.h:365
#define KP_VOLTAGE
Definition kst_panel_int.h:133
#define KP_CURRENT
Keypad target: the supply current limit an ENTER asks for.
Definition kst_panel_int.h:135
The registers or cells of one servo, as read.
Definition hitec_reg.h:95
The programmer's state.
Definition hitec_prog.h:389
One row: where it sits, what it shows, what it is called.
Definition hitec_panel_int.h:84
const char * name
Definition hitec_panel_int.h:93
uint8_t col
Definition hitec_panel_int.h:87
int16_t label
Definition hitec_panel_int.h:92
uint8_t row
Definition hitec_panel_int.h:86
uint8_t what
Definition hitec_panel_int.h:90
uint8_t series
Definition hitec_panel_int.h:91
uint8_t kind
Definition hitec_panel_int.h:89
uint8_t wide
Definition hitec_panel_int.h:88
uint8_t page
Definition hitec_panel_int.h:85
int values[HP_CHOICE_MAX]
char labels[HP_CHOICE_MAX][HITEC_PANEL_LINE]
char lines[HP_PAGE_LINES][HITEC_PANEL_LINE]
uint8_t level[HP_PAGE_LINES]
The overlay's state.
Definition hitec_panel_int.h:125
int kp_what
Definition hitec_panel_int.h:132
int row
Definition hitec_panel_int.h:163
uint32_t hold_rev
Definition hitec_panel_int.h:168
uint8_t id
Definition hitec_panel_int.h:161
ui_tabs_t tabs
Definition hitec_panel_int.h:130
uint8_t ed_id
Definition hitec_panel_int.h:133
uint32_t sig
Definition hitec_panel_int.h:166
gfx_rect_t area
Definition hitec_panel_int.h:127
ui_keypad_t kp
Definition hitec_panel_int.h:131
bool have
Definition hitec_panel_int.h:160
hitec_prog_t prog
Definition hitec_panel_int.h:126
hitec_prog_state_t state_seen
Definition hitec_panel_int.h:165
bool loaded
Definition hitec_panel_int.h:129
uint32_t rev
Definition hitec_panel_int.h:167
int pressed
Definition hitec_panel_int.h:162
bool open
Definition hitec_panel_int.h:128
Definition ui_widgets.h:415
A numeric keypad: what it was opened with, what is typed, and the press it holds.
Definition ui_keypad.h:61
A row of tabs: their labels, where they are, which is selected and the press under way.
Definition ui_tabs.h:27
Plain data types shared by the touch controller driver, the coordinate mapper and the event tracker....
A numeric keypad over part of a screen, for a value a slider is too coarse to place.
The panel's geometry, in one place.
The pane selector: one bench, several views of it.
The interface's words, one table per language.