rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
outputs_screen_int.h File Reference

What the OUTPUTS screen (outputs_screen.c) and its PROG PORT entry (outputs_port_entry.c, outputs_port.c) share: the left column's layout, the faces they draw in and the entry's hooks. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "gfx.h"
#include "touch_types.h"
#include "ui_layout.h"

Go to the source code of this file.

Macros

#define OU_FONT_LABEL   (&gfx_font_10x20)
 The faces of the 1024 x 600 type scale OUTPUTS draws in.
#define OU_FONT_FINE   (&gfx_font_8x16)
#define OU_FONT_PIN   (&gfx_font_16x28)
#define OU_FONT_HEAD   (&gfx_font_20x36)
#define OU_CELL   10
#define OU_LINE   22
#define OU_FOOT   (UI_ALERT_Y - UI_BAND_H - 4)
 The lowest row the screen draws or takes a press on, in the screen's coordinates: 4px above the alert band, body y 492.
#define COL_X   16
 The left column: the protocol and what the choice adds up to.
#define COL_W   300
#define COL_Y   16
#define DD_Y   44
#define DD_H   64

Functions

void outputs_port_reset (void)
void outputs_port_hide (void)
void outputs_port_cancel (void)
bool outputs_port_event (const touch_event_t *evt)
void outputs_port_tick (void)
bool outputs_port_fn_open (void)
bool outputs_port_back (void)
uint32_t outputs_port_revision (void)
void outputs_port_touched (void)
void outputs_port_draw (gfx_canvas_t *c, gfx_rect_t dd, bool pressed, bool open)
void outputs_port_name (uint8_t port, char *buf, size_t cap)
void outputs_iface_read (uint64_t pins[OUTPUTS_IFACE_COUNT])
bool outputs_port_holds (uint8_t gpio)
void outputs_port_open (void)
void outputs_port_forget_open (void)
const uint8_t * outputs_pwm_pins (const uint8_t *pins)
const uint8_t * outputs_port_pins (void)

Detailed Description

What the OUTPUTS screen (outputs_screen.c) and its PROG PORT entry (outputs_port_entry.c, outputs_port.c) share: the left column's layout, the faces they draw in and the entry's hooks.

SPDX-License-Identifier: MIT

Macro Definition Documentation

◆ COL_W

#define COL_W   300

The column's width, px.

◆ COL_X

#define COL_X   16

The left column: the protocol and what the choice adds up to.

300px from x 16, so 30 cells of OU_FONT_LABEL: the longest reason breaks into two lines of 30 cells at most in every language (test_outputs_screen_draw). The protocol list's face is 300 x 64px under the PROTOCOL label; the longest protocol name, "DSHOT600 BIDIR", draws in the 16 x 28 face there (224px of the 245px left of the chevron), every other name in 20 x 36.

◆ COL_Y

#define COL_Y   16

The PROTOCOL label's top.

◆ DD_H

#define DD_H   64

Its height, px (9.6mm).

◆ DD_Y

#define DD_Y   44

The protocol list's face: its top.

◆ OU_CELL

#define OU_CELL   10

OU_FONT_LABEL's cell width, px.

◆ OU_FONT_FINE

#define OU_FONT_FINE   (&gfx_font_8x16)

8 x 16: a cell's sub-line.

◆ OU_FONT_HEAD

#define OU_FONT_HEAD   (&gfx_font_20x36)

20 x 36: the result.

◆ OU_FONT_LABEL

#define OU_FONT_LABEL   (&gfx_font_10x20)

The faces of the 1024 x 600 type scale OUTPUTS draws in.

OU_FONT_LABEL (10 x 20) for every label, count, reason and the PIN button; OU_FONT_FINE (8 x 16) for the line under a pin's name in its cell, a data line; OU_FONT_PIN (16 x 28) for a pin's name ("GPIO 28", 112px); OU_FONT_HEAD (20 x 36) for the last write. The protocol list's face and rows pick their own face (ui_choice_font()).

◆ OU_FONT_PIN

#define OU_FONT_PIN   (&gfx_font_16x28)

16 x 28: a cell's pin name.

◆ OU_LINE

#define OU_LINE   22

The pitch of a two-line reason, px.