|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The drawing of the Hitec programmer's overlay: the tabs, the rows of the tab shown, its notes and the last message, the list of choices and the hold pages. More...
#include "hitec_panel.h"#include <stdio.h>#include <string.h>#include "hitec_reg.h"#include "ui_tabs.h"#include "ui_text.h"#include "ui_theme.h"#include "ui_widgets.h"#include "hitec_panel_int.h"Data Structures | |
| struct | note_t |
| One note: its text and its colour. More... | |
| struct | plan_t |
| Where the notes and the message of the tab shown go. More... | |
Macros | |
| #define | NOTES_MAX 6 |
| The notes a tab holds at most. | |
Functions | |
| static gfx_color_t | level_color (unsigned level) |
| The text colour of a message's level. | |
| static void | note (plan_t *p, const char *s, gfx_color_t color) |
| Adds a note. | |
| static void | record_notes (plan_t *p) |
| What stands of a write: a record of one interrupted, and a READ ALL owed before the next. | |
| static void | servo_notes (plan_t *p) |
| The SERVO tab's notes: the state, what it needs, what stands. | |
| static void | value_notes (plan_t *p) |
| The notes of a value tab. | |
| static int | rows_foot (void) |
| The top of the notes: 8px under the lowest row of the tab shown. | |
| static void | plan (plan_t *p) |
| Plans the notes and the message of the tab shown: the notes from the rows down, the message's lines under them at the foot. A note that does not fit above the message is not drawn. | |
| static void | draw_notes (gfx_canvas_t *c) |
| Draws the notes and the message of the tab shown. | |
| 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. | |
| static void | button (gfx_canvas_t *c, gfx_rect_t r, const char *label, gfx_color_t fill, bool pressed, bool enabled) |
| A button of the overlay in HP_FONT. | |
| static void | draw_port_label (gfx_canvas_t *c, gfx_rect_t rr) |
| Draws the PORT row's label: the port, the pin and the series over the receive mode and the supply, in the warning colour with no pin. | |
| static void | draw_row (gfx_canvas_t *c, int i) |
Draws row i: its label and its control. | |
| static void | draw_tab (gfx_canvas_t *c) |
| Draws the tab shown: the tabs, CLOSE, its rows and its notes. | |
| static void | draw_choice (gfx_canvas_t *c) |
| Draws the list: its title, its entries and CANCEL. | |
| static void | draw_hold (gfx_canvas_t *c) |
| Draws a hold page: its title, its lines and the two buttons. | |
| void | hitec_panel_render (gfx_canvas_t *c) |
| Draws the overlay. | |
Variables | |
| static char | s_msg [HITEC_PANEL_MSG_LINES][HITEC_PANEL_LINE] |
| Static: the message's lines, written on the UI task's path. | |
| static char | s_buf [3][HITEC_PANEL_LINE] |
| Static: the notes' own texts. | |
| static plan_t | s_plan |
| Static: one plan serves the draw and every query. | |
The drawing of the Hitec programmer's overlay: the tabs, the rows of the tab shown, its notes and the last message, the list of choices and the hold pages.
Hitec is a name or trademark of its owner; it is used here only to say which servos this overlay works with. The state and the seam are hitec_panel_int.h.
SPDX-License-Identifier: MIT
|
static |
A button of the overlay in HP_FONT.
| c | the canvas |
| r | the button |
| label | its label |
| fill | its colour |
| pressed | lightens the fill |
| enabled | false dims it |
|
static |
Draws the list: its title, its entries and CANCEL.
| c | the canvas |
|
static |
Draws a hold page: its title, its lines and the two buttons.
| c | the canvas |
|
static |
Draws the notes and the message of the tab shown.
| c | the canvas |
|
static |
Draws the PORT row's label: the port, the pin and the series over the receive mode and the supply, in the warning colour with no pin.
| c | the canvas |
| rr | the row |
|
static |
Draws row i: its label and its control.
| c | the canvas |
| i | the row's index |
|
static |
Draws the tab shown: the tabs, CLOSE, its rows and its notes.
| c | the canvas |
| const char * hitec_panel_note | ( | int | i | ) |
The note lines of the tab shown, from the top, the message's lines after them.
| i | the line |
| 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.
| void hitec_panel_render | ( | gfx_canvas_t * | c | ) |
Draws the overlay.
| c | the canvas |
|
static |
|
static |
Adds a note.
| p | the plan |
| s | its text |
| color | its colour |
|
static |
Plans the notes and the message of the tab shown: the notes from the rows down, the message's lines under them at the foot. A note that does not fit above the message is not drawn.
| p | the plan |
|
static |
What stands of a write: a record of one interrupted, and a READ ALL owed before the next.
| p | the plan |
|
static |
The top of the notes: 8px under the lowest row of the tab shown.
|
static |
The SERVO tab's notes: the state, what it needs, what stands.
| p | the plan |
|
static |
The notes of a value tab.
| p | the plan |