|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
Central place to tweak the on-brain UI look. More...
#include "liblvgl/lvgl.h"Go to the source code of this file.
Macros | |
Color palette | |
24-bit hex
| |
| #define | COL_BG lv_color_hex(0x68468F) |
| Screen background. | |
| #define | COL_PANEL lv_color_hex(0x503570) |
| Right info panel. | |
| #define | COL_ACCENT lv_color_hex(0xFFDF61) |
| Gold (headers, selected). | |
| #define | COL_ACCENT2 lv_color_hex(0xCCAA30) |
| Gold gradient bottom. | |
| #define | COL_BTN_IDLE lv_color_hex(0x553878) |
| Unselected button background. | |
| #define | COL_BORDER lv_color_hex(0xFFDF61) |
| Border lines. | |
| #define | COL_TEXT lv_color_hex(0xFFDF61) |
| Primary text (gold). | |
| #define | COL_TEXT_DIM lv_color_hex(0xCCAA30) |
| Dim text. | |
| #define | COL_TEXT_SEL lv_color_hex(0x3A2055) |
| Dark text on gold background. | |
| #define | COL_YELLOW lv_color_hex(0xFFDF61) |
| Generic yellow. | |
| #define | COL_RED lv_color_hex(0xFF4444) |
| Warning / error red. | |
LVGL theme | |
Applied in | |
| #define | COL_THEME_PRIMARY lv_color_hex(0x0D0D10) |
| Primary theme background. | |
| #define | COL_THEME_SECONDARY lv_color_hex(0x0D0D10) |
| Secondary theme background. | |
| #define | UI_THEME_DARK true |
| Dark-mode flag for the theme. | |
| #define | UI_DEFAULT_FONT (&lv_font_montserrat_20) |
| Default UI font. | |
Variables | |
Animation timing (ms) | |
Bigger values = slower animations. Change here to retune the feel of the selector / run screens. | |
| constexpr int | UI_ANIM_RUN_ZOOM_IN_MS = 550 |
| Zoom when opening run screen. | |
| constexpr int | UI_ANIM_RUN_ZOOM_OUT_MS = 450 |
| Zoom when pressing BACK. | |
| constexpr int | UI_ANIM_BANNER_PX_MS = 7 |
| Per-pixel scroll duration. | |
| constexpr int | UI_ANIM_BANNER_STAGGER_MS = 400 |
| Delay between buttons. | |
| constexpr int | UI_ANIM_BANNER_REPEAT_DELAY_MS = 800 |
| Delay before banner repeats. | |
| constexpr int | UI_ODOM_REFRESH_MS = 100 |
| Odom X/Y/Angle label refresh period. | |
Controller screen slots | |
One controller line, three text slots: LEFT | MID | RIGHT. Pick one | |
| #define | UI_CTRL_LINE 1 |
| V5 controller line, 0..2. | |
| #define | UI_CTRL_REFRESH_MS 500 |
| Controller serial is slow; keep ≥ 500. | |
| #define | UI_CTRL_SLOT_LEFT CtrlSlot::MaxMotorTempC |
| Left slot content. | |
| #define | UI_CTRL_SLOT_MID CtrlSlot::AutonTimer |
| Middle slot content. | |
| #define | UI_CTRL_SLOT_RIGHT CtrlSlot::None |
| Right slot content. | |
| enum class | CtrlSlot { None , MaxMotorTempC , AutonTimer , BatteryPct , OdomX , OdomY , OdomTheta } |
| Per-slot content options for the controller status line. More... | |
Central place to tweak the on-brain UI look.
Edit colors / font here and both the auton selector screen and the LVGL theme update together.
Covers:
pid_tuner.cpp) has its own separate palette. Definition in file ui_config.hpp.
| #define COL_ACCENT lv_color_hex(0xFFDF61) |
Gold (headers, selected).
Definition at line 27 of file ui_config.hpp.
| #define COL_ACCENT2 lv_color_hex(0xCCAA30) |
Gold gradient bottom.
Definition at line 28 of file ui_config.hpp.
| #define COL_BG lv_color_hex(0x68468F) |
Screen background.
Definition at line 25 of file ui_config.hpp.
| #define COL_BORDER lv_color_hex(0xFFDF61) |
Border lines.
Definition at line 30 of file ui_config.hpp.
| #define COL_BTN_IDLE lv_color_hex(0x553878) |
Unselected button background.
Definition at line 29 of file ui_config.hpp.
| #define COL_PANEL lv_color_hex(0x503570) |
Right info panel.
Definition at line 26 of file ui_config.hpp.
| #define COL_RED lv_color_hex(0xFF4444) |
Warning / error red.
Definition at line 35 of file ui_config.hpp.
| #define COL_TEXT lv_color_hex(0xFFDF61) |
Primary text (gold).
Definition at line 31 of file ui_config.hpp.
| #define COL_TEXT_DIM lv_color_hex(0xCCAA30) |
Dim text.
Definition at line 32 of file ui_config.hpp.
| #define COL_TEXT_SEL lv_color_hex(0x3A2055) |
Dark text on gold background.
Definition at line 33 of file ui_config.hpp.
| #define COL_THEME_PRIMARY lv_color_hex(0x0D0D10) |
Primary theme background.
Definition at line 43 of file ui_config.hpp.
| #define COL_THEME_SECONDARY lv_color_hex(0x0D0D10) |
Secondary theme background.
Definition at line 44 of file ui_config.hpp.
| #define COL_YELLOW lv_color_hex(0xFFDF61) |
Generic yellow.
Definition at line 34 of file ui_config.hpp.
| #define UI_CTRL_LINE 1 |
V5 controller line, 0..2.
Definition at line 85 of file ui_config.hpp.
| #define UI_CTRL_REFRESH_MS 500 |
Controller serial is slow; keep ≥ 500.
Definition at line 86 of file ui_config.hpp.
| #define UI_CTRL_SLOT_LEFT CtrlSlot::MaxMotorTempC |
Left slot content.
Definition at line 87 of file ui_config.hpp.
| #define UI_CTRL_SLOT_MID CtrlSlot::AutonTimer |
Middle slot content.
Definition at line 88 of file ui_config.hpp.
| #define UI_CTRL_SLOT_RIGHT CtrlSlot::None |
Right slot content.
Definition at line 89 of file ui_config.hpp.
| #define UI_DEFAULT_FONT (&lv_font_montserrat_20) |
Default UI font.
Must be one LVGL has compiled in (see lv_conf.h). Options: lv_font_montserrat_14, _16, _18, _20, _22, _24, …
Definition at line 51 of file ui_config.hpp.
| #define UI_THEME_DARK true |
Dark-mode flag for the theme.
Definition at line 45 of file ui_config.hpp.
|
strong |
Per-slot content options for the controller status line.
| Enumerator | |
|---|---|
| None | Empty slot. |
| MaxMotorTempC |
|
| AutonTimer |
|
| BatteryPct |
|
| OdomX |
|
| OdomY |
|
| OdomTheta |
|
Definition at line 75 of file ui_config.hpp.
|
constexpr |
Per-pixel scroll duration.
Definition at line 62 of file ui_config.hpp.
|
constexpr |
Delay before banner repeats.
Definition at line 64 of file ui_config.hpp.
|
constexpr |
Delay between buttons.
Definition at line 63 of file ui_config.hpp.
|
constexpr |
Zoom when opening run screen.
Definition at line 60 of file ui_config.hpp.
|
constexpr |
Zoom when pressing BACK.
Definition at line 61 of file ui_config.hpp.
|
constexpr |
Odom X/Y/Angle label refresh period.
Definition at line 65 of file ui_config.hpp.