|
|
#define | W UI_PANEL_W |
| | The panel's width, UI_PANEL_W px.
|
|
#define | H UI_PANEL_H |
| | The panel's height, UI_PANEL_H px.
|
|
#define | BF_FONT_HEAD (&gfx_font_20x36) |
| | The bar's title and the verdict: 20 x 36.
|
|
#define | BF_FONT_BODY UI_FONT_BODY |
| | The meaning, the checks and the notes: 12 x 24.
|
|
#define | BF_FONT_LABEL (&gfx_font_10x20) |
| | The headings, the number column and the button: 10 x 20.
|
| #define | BODY_CELL 12 |
|
#define | BAR_H 64 |
| | The red bar's height, px.
|
|
#define | VERDICT_Y (BAR_H + 12) |
| | The verdict's top.
|
|
#define | COLS_Y (VERDICT_Y + 48) |
| | The two columns' top.
|
|
#define | COL_X 24 |
|
#define | NUM_W 240 |
| | The number column's width, px: 24 cells of BF_FONT_LABEL.
|
|
#define | NUM_X (W - 24 - NUM_W) |
|
#define | COL_W (NUM_X - 24 - COL_X) |
| | The left column's width, px.
|
|
#define | COL_CELLS (COL_W / BODY_CELL) |
| | The left column's cells of BF_FONT_BODY.
|
|
#define | WRAP_PITCH 28 |
| | A wrapped BF_FONT_BODY line's pitch, px.
|
|
#define | NUM_PITCH 22 |
| | The number column's line pitch, px.
|
|
#define | NUM_HEAD 24 |
| | The step under a number column heading, px.
|
|
#define | NUM_GAP 28 |
| | The step between two number column sections, px.
|
|
#define | MEANING_LINES 2 |
| | The lines the meaning takes at most.
|
|
#define | HEAD_Y (COLS_Y + MEANING_LINES * WRAP_PITCH + 8) |
|
#define | LIST_Y (HEAD_Y + 28) |
| | The first check's top.
|
|
#define | LIST_PITCH 32 |
| | The step from one check to the next, px.
|
|
#define | LIST_MAX 5 |
|
#define | LIST_INDENT 16 |
| | A check's text right of its bullet, px.
|
|
#define | LIST_CELLS ((COL_W - LIST_INDENT) / BODY_CELL) |
| | A check's cells of BF_FONT_BODY.
|
|
#define | NOTE_Y (LIST_Y + LIST_MAX * LIST_PITCH + 2 * WRAP_PITCH) |
| | The first note's top: under the fullest list.
|
|
#define | ACK_H 56 |
| | The acknowledgement's height, px.
|
|
#define | ACK_Y (H - ACK_H - 16) |
| | The acknowledgement's top, 16px above the panel's edge.
|
|
#define | ACK_X COL_X |
|
#define | ACK_W (W - 2 * COL_X) |
|
#define | RULE_Y (ACK_Y - 8) |
| | The rule over the acknowledgement.
|
|
|
void | busfault_screen_invalidate (void) |
|
static void | reset (void) |
| void | busfault_screen_set (const busfault_report_t *r) |
| const busfault_report_t * | busfault_screen_report (void) |
| bool | busfault_screen_take_ack (void) |
|
static const char * | bus_text (busfault_bus_t b) |
|
static const char * | bus_word (busfault_bus_t b) |
|
static const char * | bus_meaning (busfault_bus_t b) |
|
static int | bus_checks (busfault_bus_t b, const char *out[LIST_MAX]) |
|
static const char * | meaning_of (can_selftest_verdict_t v) |
|
static int | checks_for (can_selftest_verdict_t v, const char *out[LIST_MAX]) |
| const char * | busfault_verdict_text (can_selftest_verdict_t v) |
|
static bool | in_ack (int16_t x, int16_t y) |
|
static void | event (const touch_event_t *evt) |
| static void | tick (float dt_s) |
| | Time passed: the acknowledge flash runs on by dt_s.
|
|
static size_t | line_len (const char *at, int cells) |
| static int | wrap_text (gfx_canvas_t *c, int x, int y, const char *text, int cells, gfx_color_t ink) |
| | text in lines of at most cells of BF_FONT_BODY, broken after a space, from (x, y) down by WRAP_PITCH.
|
| static gfx_color_t | ack_fill (void) |
| | The acknowledge button's fill.
|
| static void | draw_link_numbers (gfx_canvas_t *c) |
| | The right-hand column for a link that dropped: this end's controller, and how long it has been quiet.
|
| static void | draw_numbers (gfx_canvas_t *c) |
| | The right-hand column for the start-up test: the probes, this panel's controller and the IOmcu's.
|
| static void | render (gfx_canvas_t *c, int buffer_index) |
| | The screen: the bar, the verdict, both columns and the notes once per framebuffer, the acknowledgement every frame.
|
|
static void | cancel (void) |
|
const ui_screen_t * | busfault_screen (void) |
busfault_screen.h says what this screen is for.
SPDX-License-Identifier: MIT