|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The panel's geometry, in one place. More...
Go to the source code of this file.
Macros | |
| #define | UI_PANEL_W 1024 |
| The panel's width in pixels: the whole glass of the ESP32-P4 7B, about 153.6mm across, 0.150mm a pixel (assumed, not measured). | |
| #define | UI_PANEL_H 600 |
| The panel's height in pixels, about 90.0mm. | |
| #define | UI_BAND_H 60 |
| The height of the band the router owns across the top, with STOP: 60px, 9.0mm. | |
| #define | UI_ALERT_H 44 |
| The alert band the router draws across the bottom of the panel while an alert shows. | |
| #define | UI_ALERT_Y (UI_PANEL_H - UI_ALERT_H) |
| The alert band's top in panel coordinates: UI_PANEL_H - UI_ALERT_H. | |
| #define | UI_BODY_H (UI_PANEL_H - UI_BAND_H) |
| The height of the body below the band, the sub-canvas a screen gets. | |
| #define | UI_MARGIN 8 |
| A screen's outer margin, in pixels. | |
| #define | UI_R_CARD 10 |
| Corner radii in pixels, one scale for cards, controls and chips: a card's 10px. | |
| #define | UI_R_CTL 8 |
| A control's corner radius: 8px. | |
| #define | UI_R_CHIP 5 |
| A chip's corner radius: 5px. | |
| #define | UI_TAP_MIN 48 |
| The smallest touch target for a control, in pixels: 48px, 7.2mm. | |
| #define | UI_BTN_H 48 |
| The common button's height in pixels: UI_TAP_MIN, 48px (7.2mm). | |
| #define | UI_BTN_H_TALL 56 |
| The taller button of the ESC panel: 56px (8.4mm). | |
The panel's geometry, in one place.
Every screen, the router and the host renderers take the panel size, the band, the body and the shared metrics from here, so a different panel changes these figures and nothing else. Two other places hold the size the screens draw, both checked against this header: BOARD_UI_H_RES and BOARD_UI_V_RES in the panel firmware's board_pins.h, the display's canvas (a _Static_assert in main.c, beside one that the canvas fits the glass, BOARD_LCD_H_RES x BOARD_LCD_V_RES), and INJ_RES_X and INJ_RES_Y in the touch injector's injector.h (test_layout). Per-screen constants stay in the screen's own files, in panel pixels.
Plain constants only, with no includes, so a file that needs a size does not pull in the drawing or screen interfaces.
SPDX-License-Identifier: MIT
| #define UI_ALERT_H 44 |
The alert band the router draws across the bottom of the panel while an alert shows.
UI_ALERT_H is its height and UI_ALERT_Y its top, in panel coordinates.
| #define UI_TAP_MIN 48 |
The smallest touch target for a control, in pixels: 48px, 7.2mm.
UI_BTN_H is this height; the screens' other controls size to it in their own layouts.