mirror of
https://github.com/adrigongv23/G26---Telemetry-Software.git
synced 2026-05-25 12:31:27 +02:00
Archivos innecesarios eliminados
This commit is contained in:
parent
6adc19faf6
commit
05e04d75fd
62 changed files with 0 additions and 240708 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,617 +0,0 @@
|
||||||
/**
|
|
||||||
* @file lv_conf.h
|
|
||||||
* LVGL Configuration for CrowPanel 5.0" ESP32-S3 Display
|
|
||||||
* Optimized for Formula Student Dashboard Application
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef LV_CONF_H
|
|
||||||
#define LV_CONF_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/*====================
|
|
||||||
COLOR SETTINGS
|
|
||||||
*====================*/
|
|
||||||
|
|
||||||
/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
|
|
||||||
#define LV_COLOR_DEPTH 16
|
|
||||||
|
|
||||||
/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
|
|
||||||
#define LV_COLOR_16_SWAP 0
|
|
||||||
|
|
||||||
/*Enable more complex drawing routines to manage screens transparency.
|
|
||||||
*Can be used if the UI is above another layer, e.g. an OSD menu or video player.
|
|
||||||
*Requires `LV_COLOR_DEPTH = 32` colors and the screen's `bg_opa` should be set to non LV_OPA_COVER value*/
|
|
||||||
#define LV_COLOR_SCREEN_TRANSP 0
|
|
||||||
|
|
||||||
/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
|
|
||||||
* 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */
|
|
||||||
#define LV_COLOR_MIX_ROUND_OFS 0
|
|
||||||
|
|
||||||
/*====================
|
|
||||||
MEMORY SETTINGS
|
|
||||||
*====================*/
|
|
||||||
|
|
||||||
/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
|
|
||||||
#define LV_MEM_CUSTOM 0
|
|
||||||
#if LV_MEM_CUSTOM == 0
|
|
||||||
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
|
|
||||||
#define LV_MEM_SIZE (64 * 1024U) /*[bytes] Increased for dashboard widgets*/
|
|
||||||
|
|
||||||
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
|
|
||||||
#define LV_MEM_ADR 0 /*0: unused*/
|
|
||||||
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
|
|
||||||
#if LV_MEM_ADR == 0
|
|
||||||
#undef LV_MEM_POOL_INCLUDE
|
|
||||||
#undef LV_MEM_POOL_ALLOC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else /*LV_MEM_CUSTOM*/
|
|
||||||
#define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
|
|
||||||
#define LV_MEM_CUSTOM_ALLOC malloc
|
|
||||||
#define LV_MEM_CUSTOM_FREE free
|
|
||||||
#define LV_MEM_CUSTOM_REALLOC realloc
|
|
||||||
#endif /*LV_MEM_CUSTOM*/
|
|
||||||
|
|
||||||
/*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms.
|
|
||||||
*You will see an error log message if there wasn't enough buffers. */
|
|
||||||
#define LV_MEM_BUF_MAX_NUM 16
|
|
||||||
|
|
||||||
/*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/
|
|
||||||
#define LV_MEMCPY_MEMSET_STD 1
|
|
||||||
|
|
||||||
/*====================
|
|
||||||
HAL SETTINGS
|
|
||||||
*====================*/
|
|
||||||
|
|
||||||
/*Default display refresh period. LVG will redraw changed areas with this period time*/
|
|
||||||
#define LV_DISP_DEF_REFR_PERIOD 16 /*[ms] 60 FPS for smooth dashboard*/
|
|
||||||
|
|
||||||
/*Input device read period in milliseconds*/
|
|
||||||
#define LV_INDEV_DEF_READ_PERIOD 20 /*[ms] Touch responsiveness*/
|
|
||||||
|
|
||||||
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
|
||||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
|
||||||
#define LV_TICK_CUSTOM 1
|
|
||||||
#if LV_TICK_CUSTOM
|
|
||||||
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
|
||||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
|
||||||
#endif /*LV_TICK_CUSTOM*/
|
|
||||||
|
|
||||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
|
||||||
*(Not so important, you can adjust it to modify default sizes and spaces)*/
|
|
||||||
#define LV_DPI_DEF 130 /*[px/inch] Good for 5" 800x480 display*/
|
|
||||||
|
|
||||||
/*====================
|
|
||||||
FEATURE CONFIGURATION
|
|
||||||
*====================*/
|
|
||||||
|
|
||||||
/*-------------
|
|
||||||
* Drawing
|
|
||||||
*-----------*/
|
|
||||||
|
|
||||||
/*Enable complex draw engine.
|
|
||||||
*Required to draw shadow, gradient, rounded corners, circles, arc, skew, image transformations or any masks*/
|
|
||||||
#define LV_DRAW_COMPLEX 1
|
|
||||||
#if LV_DRAW_COMPLEX != 0
|
|
||||||
|
|
||||||
/*Allow buffering some shadow calculation.
|
|
||||||
*LV_DRAW_COMPLEX should be 1 first*/
|
|
||||||
#define LV_SHADOW_CACHE_SIZE 0
|
|
||||||
|
|
||||||
/* Set number of maximally cached circle data.
|
|
||||||
* The circumference of 1/4 circle are saved for anti-aliasing
|
|
||||||
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
|
|
||||||
* 0: to disable caching */
|
|
||||||
#define LV_CIRCLE_CACHE_SIZE 4
|
|
||||||
#endif /*LV_DRAW_COMPLEX*/
|
|
||||||
|
|
||||||
/*Default image cache size. Image caching keeps the images opened.
|
|
||||||
*If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added)
|
|
||||||
*With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
|
|
||||||
*However the opened images might consume additional RAM.
|
|
||||||
*0: to disable caching*/
|
|
||||||
#define LV_IMG_CACHE_DEF_SIZE 0 /*Disable for memory optimization*/
|
|
||||||
|
|
||||||
/*Number of stops allowed per gradient. Increase this to allow more stops.
|
|
||||||
*This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
|
|
||||||
#define LV_GRADIENT_MAX_STOPS 2
|
|
||||||
|
|
||||||
/*Default gradient buffer size.
|
|
||||||
*When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.
|
|
||||||
*LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
|
|
||||||
*If the cache is too small the map will be allocated only while it's required for the drawing.
|
|
||||||
*0 mean no caching.*/
|
|
||||||
#define LV_GRAD_CACHE_DEF_SIZE 0
|
|
||||||
|
|
||||||
/*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
|
|
||||||
*LV_DITHER_GRADIENT implies LV_GRADIENT_MAX_STOPS = 256 (if it's less than 256)*/
|
|
||||||
#define LV_DITHER_GRADIENT 0
|
|
||||||
|
|
||||||
/*Add support for error diffusion dithering.
|
|
||||||
*Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing.
|
|
||||||
*The increase in memory consumption is (lv_color_size + 1) per pixel of the screen in the direction the image is being drawn to.
|
|
||||||
*Note that drawing is not always done in the same direction, when inverting an area with LV_BLEND_MODE_REPLACE the direction is opposite.*/
|
|
||||||
#define LV_DITHER_ERROR_DIFFUSION 0
|
|
||||||
|
|
||||||
/*Maximum buffer size to allocate for rotation.
|
|
||||||
*Only used if software rotation is enabled in the display driver.*/
|
|
||||||
#define LV_DISP_ROT_MAX_BUF (10*1024)
|
|
||||||
|
|
||||||
/*-------------
|
|
||||||
* GPU
|
|
||||||
*-----------*/
|
|
||||||
|
|
||||||
/*Use Arm's 2D acceleration library Arm-2D */
|
|
||||||
#define LV_USE_GPU_ARM2D 0
|
|
||||||
|
|
||||||
/*Use STM32's DMA2D (aka Chrom Art) GPU*/
|
|
||||||
#define LV_USE_GPU_STM32_DMA2D 0
|
|
||||||
|
|
||||||
/*Enable RA8875 GPU*/
|
|
||||||
#define LV_USE_GPU_RA8875 0
|
|
||||||
|
|
||||||
/*Use SWM341's DMA2D GPU*/
|
|
||||||
#define LV_USE_GPU_SWM341_DMA2D 0
|
|
||||||
|
|
||||||
/*Use NXP's PXP GPU iMX RTxxx platforms*/
|
|
||||||
#define LV_USE_GPU_NXP_PXP 0
|
|
||||||
|
|
||||||
/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
|
|
||||||
#define LV_USE_GPU_NXP_VG_LITE 0
|
|
||||||
|
|
||||||
/*Use SDL renderer API*/
|
|
||||||
#define LV_USE_GPU_SDL 0
|
|
||||||
|
|
||||||
/*-------------
|
|
||||||
* Logging
|
|
||||||
*-----------*/
|
|
||||||
|
|
||||||
/*Enable the log module*/
|
|
||||||
#define LV_USE_LOG 1
|
|
||||||
#if LV_USE_LOG
|
|
||||||
|
|
||||||
/*How important log should be added:
|
|
||||||
*LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
|
|
||||||
*LV_LOG_LEVEL_INFO Log important events
|
|
||||||
*LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
|
|
||||||
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
|
|
||||||
*LV_LOG_LEVEL_USER Only logs added by the user
|
|
||||||
*LV_LOG_LEVEL_NONE Do not log anything*/
|
|
||||||
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
|
|
||||||
|
|
||||||
/*1: Print the log with 'printf';
|
|
||||||
*0: User need to register a callback with `lv_log_register_print_cb()`*/
|
|
||||||
#define LV_LOG_PRINTF 1
|
|
||||||
|
|
||||||
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
|
|
||||||
#define LV_LOG_TRACE_MEM 1
|
|
||||||
#define LV_LOG_TRACE_TIMER 1
|
|
||||||
#define LV_LOG_TRACE_INDEV 1
|
|
||||||
#define LV_LOG_TRACE_DISP_REFR 1
|
|
||||||
#define LV_LOG_TRACE_EVENT 1
|
|
||||||
#define LV_LOG_TRACE_OBJ_CREATE 1
|
|
||||||
#define LV_LOG_TRACE_LAYOUT 1
|
|
||||||
#define LV_LOG_TRACE_ANIM 1
|
|
||||||
|
|
||||||
#endif /*LV_USE_LOG*/
|
|
||||||
|
|
||||||
/*-------------
|
|
||||||
* Asserts
|
|
||||||
*-----------*/
|
|
||||||
|
|
||||||
/*Enable asserts if an operation is failed or an invalid data is found.
|
|
||||||
*If LV_USE_LOG is enabled an error message will be printed on failure*/
|
|
||||||
#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
|
|
||||||
#define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
|
|
||||||
#define LV_USE_ASSERT_STYLE 0 /*Check if the style is properly initialized. (Very fast, recommended)*/
|
|
||||||
#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
|
|
||||||
#define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/
|
|
||||||
|
|
||||||
/*Add a custom handler when assert happens e.g. to restart the MCU*/
|
|
||||||
#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
|
|
||||||
#define LV_ASSERT_HANDLER while(1); /*Halt in debug builds*/
|
|
||||||
|
|
||||||
/*-------------
|
|
||||||
* Others
|
|
||||||
*-----------*/
|
|
||||||
|
|
||||||
/*1: Show CPU usage and FPS count*/
|
|
||||||
#define LV_USE_PERF_MONITOR 1
|
|
||||||
#if LV_USE_PERF_MONITOR
|
|
||||||
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_RIGHT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*1: Show the used memory and the memory fragmentation
|
|
||||||
* Requires LV_MEM_CUSTOM = 0*/
|
|
||||||
#define LV_USE_MEM_MONITOR 1
|
|
||||||
#if LV_USE_MEM_MONITOR
|
|
||||||
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_LEFT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*1: Draw random colored rectangles over the redrawn areas*/
|
|
||||||
#define LV_USE_REFR_DEBUG 0
|
|
||||||
|
|
||||||
/*Change the built in (v)snprintf functions*/
|
|
||||||
#define LV_SPRINTF_CUSTOM 0
|
|
||||||
#if LV_SPRINTF_CUSTOM
|
|
||||||
#define LV_SPRINTF_INCLUDE <stdio.h>
|
|
||||||
#define lv_snprintf snprintf
|
|
||||||
#define lv_vsnprintf vsnprintf
|
|
||||||
#else /*LV_SPRINTF_CUSTOM*/
|
|
||||||
#define LV_SPRINTF_USE_FLOAT 0
|
|
||||||
#endif /*LV_SPRINTF_CUSTOM*/
|
|
||||||
|
|
||||||
#define LV_USE_USER_DATA 1
|
|
||||||
|
|
||||||
/*Garbage Collector settings
|
|
||||||
*Used if lvgl is bound to higher level language and the memory is managed by that language*/
|
|
||||||
#define LV_ENABLE_GC 0
|
|
||||||
#if LV_ENABLE_GC != 0
|
|
||||||
#define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
|
|
||||||
#endif /*LV_ENABLE_GC*/
|
|
||||||
|
|
||||||
/*====================
|
|
||||||
* COMPILER SETTINGS
|
|
||||||
*====================*/
|
|
||||||
|
|
||||||
/*For big endian systems set to 1*/
|
|
||||||
#define LV_BIG_ENDIAN_SYSTEM 0
|
|
||||||
|
|
||||||
/*Define a custom attribute to `lv_tick_inc` function*/
|
|
||||||
#define LV_ATTRIBUTE_TICK_INC
|
|
||||||
|
|
||||||
/*Define a custom attribute to `lv_timer_handler` function*/
|
|
||||||
#define LV_ATTRIBUTE_TIMER_HANDLER
|
|
||||||
|
|
||||||
/*Define a custom attribute to `lv_disp_flush_ready` function*/
|
|
||||||
#define LV_ATTRIBUTE_FLUSH_READY
|
|
||||||
|
|
||||||
/*Required alignment size for buffers*/
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
|
|
||||||
|
|
||||||
/*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default).
|
|
||||||
* E.g. __attribute__((aligned(4)))*/
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
|
|
||||||
/*Attribute to mark large constant arrays for example font's bitmaps*/
|
|
||||||
#define LV_ATTRIBUTE_LARGE_CONST
|
|
||||||
|
|
||||||
/*Compiler prefix for a big array declaration in RAM*/
|
|
||||||
#define LV_ATTRIBUTE_LARGE_RAM_ARRAY
|
|
||||||
|
|
||||||
/*Place performance critical functions into a faster memory (e.g RAM)*/
|
|
||||||
#define LV_ATTRIBUTE_FAST_MEM
|
|
||||||
|
|
||||||
/*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible*/
|
|
||||||
#define LV_ATTRIBUTE_DMA
|
|
||||||
|
|
||||||
/*Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
|
|
||||||
*should also appear on LVGL binding API such as Micropython.*/
|
|
||||||
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
|
|
||||||
|
|
||||||
/*Extend the default -32k..32k coordinate range to -4M..4M by using int32_t for coordinates instead of int16_t*/
|
|
||||||
#define LV_USE_LARGE_COORD 0
|
|
||||||
|
|
||||||
/*==================
|
|
||||||
* FONT USAGE
|
|
||||||
*=================*/
|
|
||||||
|
|
||||||
/*Montserrat fonts with various styles and sizes with bpp = 4
|
|
||||||
*https://fonts.google.com/specimen/Montserrat */
|
|
||||||
#define LV_FONT_MONTSERRAT_8 0
|
|
||||||
#define LV_FONT_MONTSERRAT_10 0
|
|
||||||
#define LV_FONT_MONTSERRAT_12 0
|
|
||||||
#define LV_FONT_MONTSERRAT_14 1
|
|
||||||
#define LV_FONT_MONTSERRAT_16 1
|
|
||||||
#define LV_FONT_MONTSERRAT_18 0
|
|
||||||
#define LV_FONT_MONTSERRAT_20 0
|
|
||||||
#define LV_FONT_MONTSERRAT_22 0
|
|
||||||
#define LV_FONT_MONTSERRAT_24 0
|
|
||||||
#define LV_FONT_MONTSERRAT_26 0
|
|
||||||
#define LV_FONT_MONTSERRAT_28 0
|
|
||||||
#define LV_FONT_MONTSERRAT_30 1
|
|
||||||
#define LV_FONT_MONTSERRAT_32 0
|
|
||||||
#define LV_FONT_MONTSERRAT_34 0
|
|
||||||
#define LV_FONT_MONTSERRAT_36 0
|
|
||||||
#define LV_FONT_MONTSERRAT_38 0
|
|
||||||
#define LV_FONT_MONTSERRAT_40 0
|
|
||||||
#define LV_FONT_MONTSERRAT_42 0
|
|
||||||
#define LV_FONT_MONTSERRAT_44 0
|
|
||||||
#define LV_FONT_MONTSERRAT_46 0
|
|
||||||
#define LV_FONT_MONTSERRAT_48 1
|
|
||||||
|
|
||||||
/*Demonstrate special features*/
|
|
||||||
#define LV_FONT_MONTSERRAT_12_SUBPX 0
|
|
||||||
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
|
|
||||||
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Perisan letters and all their forms*/
|
|
||||||
#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
|
|
||||||
|
|
||||||
/*Pixel perfect monospace fonts*/
|
|
||||||
#define LV_FONT_UNSCII_8 1
|
|
||||||
#define LV_FONT_UNSCII_16 1
|
|
||||||
|
|
||||||
/*Optionally declare custom fonts here.
|
|
||||||
*You can use these fonts as default font too and they will be available globally.
|
|
||||||
*E.g. #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/
|
|
||||||
#define LV_FONT_CUSTOM_DECLARE
|
|
||||||
|
|
||||||
/*Always set a default font*/
|
|
||||||
#define LV_FONT_DEFAULT &lv_font_montserrat_14
|
|
||||||
|
|
||||||
/*Enable handling large font and/or fonts with a lot of characters.
|
|
||||||
*The limit depends on the font size, font face and bpp.
|
|
||||||
*Compiler error will be triggered if a font needs it.*/
|
|
||||||
#define LV_FONT_FMT_TXT_LARGE 1
|
|
||||||
|
|
||||||
/*Enables/disables support for compressed fonts.*/
|
|
||||||
#define LV_USE_FONT_COMPRESSED 0
|
|
||||||
|
|
||||||
/*Enable subpixel rendering*/
|
|
||||||
#define LV_USE_FONT_SUBPX 0
|
|
||||||
#if LV_USE_FONT_SUBPX
|
|
||||||
/*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
|
|
||||||
#define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Enable drawing placeholders when glyph dsc is not found*/
|
|
||||||
#define LV_USE_FONT_PLACEHOLDER 1
|
|
||||||
|
|
||||||
/*=================
|
|
||||||
* TEXT SETTINGS
|
|
||||||
*=================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Select a character encoding for strings.
|
|
||||||
* Your IDE or editor should have the same character encoding
|
|
||||||
* - LV_TXT_ENC_UTF8
|
|
||||||
* - LV_TXT_ENC_ASCII
|
|
||||||
*/
|
|
||||||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
|
||||||
|
|
||||||
/*Can break (wrap) texts on these chars*/
|
|
||||||
#define LV_TXT_BREAK_CHARS " ,.;:-_"
|
|
||||||
|
|
||||||
/*If a word is at least this long, will break wherever "prettiest"
|
|
||||||
*To disable, set to a value <= 0*/
|
|
||||||
#define LV_TXT_LINE_BREAK_LONG_LEN 0
|
|
||||||
|
|
||||||
/*Minimum number of characters in a long word to put on a line before a break.
|
|
||||||
*Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
|
|
||||||
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
|
|
||||||
|
|
||||||
/*Minimum number of characters in a long word to put on a line after a break.
|
|
||||||
*Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
|
|
||||||
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
|
|
||||||
|
|
||||||
/*The control character to use for signalling text recoloring.*/
|
|
||||||
#define LV_TXT_COLOR_CMD "#"
|
|
||||||
|
|
||||||
/*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts.
|
|
||||||
*The direction will be processed according to the Unicode Bidirectional Algorithm:
|
|
||||||
*https://www.unicode.org/reports/tr9/*/
|
|
||||||
#define LV_USE_BIDI 0
|
|
||||||
#if LV_USE_BIDI
|
|
||||||
/*Set the default direction. Supported values:
|
|
||||||
*`LV_BASE_DIR_LTR` Left-to-Right
|
|
||||||
*`LV_BASE_DIR_RTL` Right-to-Left
|
|
||||||
*`LV_BASE_DIR_AUTO` detect texts base direction*/
|
|
||||||
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Enable Arabic/Persian processing
|
|
||||||
*In these languages characters should be replaced with an other form based on their position in the text*/
|
|
||||||
#define LV_USE_ARABIC_PERSIAN_CHARS 0
|
|
||||||
|
|
||||||
/*==================
|
|
||||||
* WIDGET USAGE
|
|
||||||
*================*/
|
|
||||||
|
|
||||||
/*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/
|
|
||||||
|
|
||||||
#define LV_USE_ARC 1
|
|
||||||
#define LV_USE_BAR 1
|
|
||||||
#define LV_USE_BTN 1
|
|
||||||
#define LV_USE_BTNMATRIX 1
|
|
||||||
#define LV_USE_CANVAS 0
|
|
||||||
#define LV_USE_CHECKBOX 1
|
|
||||||
#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
|
|
||||||
#define LV_USE_IMG 1 /*Requires: lv_label*/
|
|
||||||
#define LV_USE_LABEL 1
|
|
||||||
#if LV_USE_LABEL
|
|
||||||
/*1: Enable selecting text of the label*/
|
|
||||||
#define LV_LABEL_TEXT_SELECTION 0
|
|
||||||
/*1: Enable long mode in labels. Save some code size.*/
|
|
||||||
#define LV_LABEL_LONG_TXT_HINT 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LV_USE_LINE 1
|
|
||||||
#define LV_USE_ROLLER 1 /*Requires: lv_label*/
|
|
||||||
#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
|
|
||||||
#define LV_USE_SWITCH 1
|
|
||||||
#define LV_USE_TEXTAREA 0 /*Requires: lv_label*/
|
|
||||||
#if LV_USE_TEXTAREA != 0
|
|
||||||
/*1: Enable placeholder text*/
|
|
||||||
#define LV_TEXTAREA_PLACEHOLDER 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LV_USE_TABLE 0
|
|
||||||
|
|
||||||
/*==================
|
|
||||||
* EXTRA COMPONENTS
|
|
||||||
*================*/
|
|
||||||
|
|
||||||
/*-----------
|
|
||||||
* Widgets
|
|
||||||
*----------*/
|
|
||||||
#define LV_USE_ANIMIMG 0
|
|
||||||
#define LV_USE_CALENDAR 0
|
|
||||||
#define LV_USE_CHART 1 /*Useful for diagnostic plots*/
|
|
||||||
#define LV_USE_COLORWHEEL 0
|
|
||||||
#define LV_USE_IMGBTN 1
|
|
||||||
#define LV_USE_KEYBOARD 0
|
|
||||||
#define LV_USE_LED 1 /*Perfect for warning indicators*/
|
|
||||||
#define LV_USE_LIST 0
|
|
||||||
#define LV_USE_MENU 0
|
|
||||||
#define LV_USE_METER 1 /*Perfect for RPM, temperature gauges*/
|
|
||||||
#define LV_USE_MSGBOX 1 /*For error dialogs*/
|
|
||||||
#define LV_USE_SPINBOX 0
|
|
||||||
#define LV_USE_SPINNER 1 /*Loading indicators*/
|
|
||||||
#define LV_USE_TABVIEW 1 /*Multiple screens/pages*/
|
|
||||||
#define LV_USE_TILEVIEW 0
|
|
||||||
#define LV_USE_WIN 0
|
|
||||||
|
|
||||||
/*-----------
|
|
||||||
* Themes
|
|
||||||
*----------*/
|
|
||||||
|
|
||||||
/*A simple, impressive and very complete theme*/
|
|
||||||
#define LV_USE_THEME_DEFAULT 1
|
|
||||||
#if LV_USE_THEME_DEFAULT
|
|
||||||
|
|
||||||
/*0: Light mode; 1: Dark mode*/
|
|
||||||
#define LV_THEME_DEFAULT_DARK 1
|
|
||||||
|
|
||||||
/*1: Enable grow on press*/
|
|
||||||
#define LV_THEME_DEFAULT_GROW 1
|
|
||||||
|
|
||||||
/*Default transition time in [ms]*/
|
|
||||||
#define LV_THEME_DEFAULT_TRANSITION_TIME 80
|
|
||||||
#endif /*LV_USE_THEME_DEFAULT*/
|
|
||||||
|
|
||||||
/*A very simple theme that is a good starting point for a custom theme*/
|
|
||||||
#define LV_USE_THEME_BASIC 1
|
|
||||||
|
|
||||||
/*A theme designed for monochrome displays*/
|
|
||||||
#define LV_USE_THEME_MONO 0
|
|
||||||
|
|
||||||
/*-----------
|
|
||||||
* Layouts
|
|
||||||
*----------*/
|
|
||||||
|
|
||||||
/*A layout similar to Flexbox in CSS.*/
|
|
||||||
#define LV_USE_FLEX 1
|
|
||||||
|
|
||||||
/*A layout similar to Grid in CSS.*/
|
|
||||||
#define LV_USE_GRID 1
|
|
||||||
|
|
||||||
/*-----------
|
|
||||||
* 3rd party libraries
|
|
||||||
*----------*/
|
|
||||||
|
|
||||||
/*File system interfaces for common APIs */
|
|
||||||
|
|
||||||
/*API for fopen, fread, etc*/
|
|
||||||
#define LV_USE_FS_STDIO 0
|
|
||||||
#if LV_USE_FS_STDIO
|
|
||||||
#define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
|
||||||
#define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
|
||||||
#define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*API for open, read, etc*/
|
|
||||||
#define LV_USE_FS_POSIX 0
|
|
||||||
#if LV_USE_FS_POSIX
|
|
||||||
#define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
|
||||||
#define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
|
||||||
#define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*API for CreateFile, ReadFile, etc*/
|
|
||||||
#define LV_USE_FS_WIN32 0
|
|
||||||
#if LV_USE_FS_WIN32
|
|
||||||
#define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
|
||||||
#define LV_FS_WIN32_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
|
||||||
#define LV_FS_WIN32_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/
|
|
||||||
#define LV_USE_FS_FATFS 0
|
|
||||||
#if LV_USE_FS_FATFS
|
|
||||||
#define LV_FS_FATFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
|
||||||
#define LV_FS_FATFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*PNG decoder library*/
|
|
||||||
#define LV_USE_PNG 0
|
|
||||||
|
|
||||||
/*BMP decoder library*/
|
|
||||||
#define LV_USE_BMP 0
|
|
||||||
|
|
||||||
/*JPG + split JPG decoder library.
|
|
||||||
*Split JPG is a custom format optimized for embedded systems. */
|
|
||||||
#define LV_USE_SJPG 0
|
|
||||||
|
|
||||||
/*GIF decoder library*/
|
|
||||||
#define LV_USE_GIF 0
|
|
||||||
|
|
||||||
/*QR code library*/
|
|
||||||
#define LV_USE_QRCODE 0
|
|
||||||
|
|
||||||
/*FreeType library*/
|
|
||||||
#define LV_USE_FREETYPE 0
|
|
||||||
#if LV_USE_FREETYPE
|
|
||||||
/*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
|
|
||||||
#define LV_FREETYPE_CACHE_SIZE (16 * 1024)
|
|
||||||
#if LV_FREETYPE_CACHE_SIZE >= 0
|
|
||||||
/* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
|
|
||||||
/* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
|
|
||||||
/* if font size >= 256, must use image cache */
|
|
||||||
#define LV_FREETYPE_SBIT_CACHE 0
|
|
||||||
/* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
|
|
||||||
/* (0:use system defaults) */
|
|
||||||
#define LV_FREETYPE_CACHE_FT_FACES 0
|
|
||||||
#define LV_FREETYPE_CACHE_FT_SIZES 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Rlottie library*/
|
|
||||||
#define LV_USE_RLOTTIE 0
|
|
||||||
|
|
||||||
/*FFmpeg library for image decoding and playing videos
|
|
||||||
*Supports all major image formats so do not enable other image decoder with it*/
|
|
||||||
#define LV_USE_FFMPEG 0
|
|
||||||
#if LV_USE_FFMPEG
|
|
||||||
/*Dump input information to stderr*/
|
|
||||||
#define LV_FFMPEG_DUMP_FORMAT 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*==================
|
|
||||||
* EXAMPLES
|
|
||||||
*==================*/
|
|
||||||
|
|
||||||
/*Enable the examples to be built with the library*/
|
|
||||||
#define LV_BUILD_EXAMPLES 0
|
|
||||||
|
|
||||||
/*===================
|
|
||||||
* DEMO USAGE
|
|
||||||
====================*/
|
|
||||||
|
|
||||||
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
|
|
||||||
#define LV_USE_DEMO_WIDGETS 0
|
|
||||||
#if LV_USE_DEMO_WIDGETS
|
|
||||||
#define LV_DEMO_WIDGETS_SLIDESHOW 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Demonstrate the usage of encoder and keyboard*/
|
|
||||||
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
|
|
||||||
|
|
||||||
/*Benchmark your system*/
|
|
||||||
#define LV_USE_DEMO_BENCHMARK 0
|
|
||||||
|
|
||||||
/*Stress test for LVGL*/
|
|
||||||
#define LV_USE_DEMO_STRESS 0
|
|
||||||
|
|
||||||
/*Music player demo*/
|
|
||||||
#define LV_USE_DEMO_MUSIC 0
|
|
||||||
#if LV_USE_DEMO_MUSIC
|
|
||||||
#define LV_DEMO_MUSIC_SQUARE 0
|
|
||||||
#define LV_DEMO_MUSIC_LANDSCAPE 0
|
|
||||||
#define LV_DEMO_MUSIC_ROUND 0
|
|
||||||
#define LV_DEMO_MUSIC_LARGE 0
|
|
||||||
#define LV_DEMO_MUSIC_AUTO_PLAY 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*--END OF LV_CONF_H--*/
|
|
||||||
|
|
||||||
#endif /*LV_CONF_H*/
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,120 +0,0 @@
|
||||||
#ifndef CROWPANEL_CONTROLLER_HPP
|
|
||||||
#define CROWPANEL_CONTROLLER_HPP
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
#include <Crowbits_DHT20.h>
|
|
||||||
#include <SPI.h>
|
|
||||||
#include <LovyanGFX.hpp>
|
|
||||||
#include <lgfx/v1/platforms/esp32s3/Panel_RGB.hpp>
|
|
||||||
#include <lgfx/v1/platforms/esp32s3/Bus_RGB.hpp>
|
|
||||||
#include "ui/ui.h"
|
|
||||||
|
|
||||||
#define TFT_BL 2
|
|
||||||
|
|
||||||
class LGFX : public lgfx::LGFX_Device
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
lgfx::Bus_RGB _bus_instance;
|
|
||||||
lgfx::Panel_RGB _panel_instance;
|
|
||||||
|
|
||||||
LGFX(void)
|
|
||||||
{
|
|
||||||
{
|
|
||||||
auto cfg = _bus_instance.config();
|
|
||||||
cfg.panel = &_panel_instance;
|
|
||||||
|
|
||||||
cfg.pin_d0 = GPIO_NUM_8; // B0
|
|
||||||
cfg.pin_d1 = GPIO_NUM_3; // B1
|
|
||||||
cfg.pin_d2 = GPIO_NUM_46; // B2
|
|
||||||
cfg.pin_d3 = GPIO_NUM_9; // B3
|
|
||||||
cfg.pin_d4 = GPIO_NUM_1; // B4
|
|
||||||
|
|
||||||
cfg.pin_d5 = GPIO_NUM_5; // G0
|
|
||||||
cfg.pin_d6 = GPIO_NUM_6; // G1
|
|
||||||
cfg.pin_d7 = GPIO_NUM_7; // G2
|
|
||||||
cfg.pin_d8 = GPIO_NUM_15; // G3
|
|
||||||
cfg.pin_d9 = GPIO_NUM_16; // G4
|
|
||||||
cfg.pin_d10 = GPIO_NUM_4; // G5
|
|
||||||
|
|
||||||
cfg.pin_d11 = GPIO_NUM_45; // R0
|
|
||||||
cfg.pin_d12 = GPIO_NUM_48; // R1
|
|
||||||
cfg.pin_d13 = GPIO_NUM_47; // R2
|
|
||||||
cfg.pin_d14 = GPIO_NUM_21; // R3
|
|
||||||
cfg.pin_d15 = GPIO_NUM_14; // R4
|
|
||||||
|
|
||||||
cfg.pin_henable = GPIO_NUM_40;
|
|
||||||
cfg.pin_vsync = GPIO_NUM_41;
|
|
||||||
cfg.pin_hsync = GPIO_NUM_39;
|
|
||||||
cfg.pin_pclk = GPIO_NUM_0;
|
|
||||||
cfg.freq_write = 15000000;
|
|
||||||
|
|
||||||
cfg.hsync_polarity = 0;
|
|
||||||
cfg.hsync_front_porch = 8;
|
|
||||||
cfg.hsync_pulse_width = 4;
|
|
||||||
cfg.hsync_back_porch = 43;
|
|
||||||
|
|
||||||
cfg.vsync_polarity = 0;
|
|
||||||
cfg.vsync_front_porch = 8;
|
|
||||||
cfg.vsync_pulse_width = 4;
|
|
||||||
cfg.vsync_back_porch = 12;
|
|
||||||
|
|
||||||
cfg.pclk_active_neg = 1;
|
|
||||||
cfg.de_idle_high = 0;
|
|
||||||
cfg.pclk_idle_high = 0;
|
|
||||||
|
|
||||||
_bus_instance.config(cfg);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto cfg = _panel_instance.config();
|
|
||||||
cfg.memory_width = 800;
|
|
||||||
cfg.memory_height = 480;
|
|
||||||
cfg.panel_width = 800;
|
|
||||||
cfg.panel_height = 480;
|
|
||||||
cfg.offset_x = 0;
|
|
||||||
cfg.offset_y = 0;
|
|
||||||
_panel_instance.config(cfg);
|
|
||||||
}
|
|
||||||
_panel_instance.setBus(&_bus_instance);
|
|
||||||
setPanel(&_panel_instance);
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class CrowPanelController {
|
|
||||||
public:
|
|
||||||
|
|
||||||
LGFX lcd;
|
|
||||||
static uint32_t screenWidth;
|
|
||||||
static uint32_t screenHeight;
|
|
||||||
static lv_disp_draw_buf_t draw_buf;
|
|
||||||
static lv_color_t disp_draw_buf[800 * 480 / 10];
|
|
||||||
static lv_disp_drv_t disp_drv;
|
|
||||||
static lv_indev_drv_t indev_drv;
|
|
||||||
|
|
||||||
CrowPanelController();
|
|
||||||
static void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
|
|
||||||
void set_value_to_label(lv_obj_t *label, double value);
|
|
||||||
void set_string_to_label(lv_obj_t *label, const char *string);
|
|
||||||
void change_screen(lv_obj_t *screen);
|
|
||||||
|
|
||||||
// New methods for conditional color management
|
|
||||||
void set_label_color(lv_obj_t *label, uint32_t color);
|
|
||||||
void set_panel_color(lv_obj_t *panel, uint32_t bg_color);
|
|
||||||
void set_conditional_colors();
|
|
||||||
void set_panel_default_style(lv_obj_t *panel); // Apply default dark grey panel styling
|
|
||||||
void update_rpm_bar(int rpm); // Update RPM LED bar based on RPM (8000-12500 range)
|
|
||||||
|
|
||||||
// Predefined colors for different conditions
|
|
||||||
static const uint32_t COLOR_NORMAL = 0xFFFFFF; // White
|
|
||||||
static const uint32_t COLOR_WARNING = 0xFFFF00; // Yellow
|
|
||||||
static const uint32_t COLOR_CRITICAL = 0xFF0000; // Red
|
|
||||||
static const uint32_t COLOR_GOOD = 0x00FF00; // Green
|
|
||||||
static const uint32_t COLOR_INFO = 0xFF8500; // Orange (current label color)
|
|
||||||
static const uint32_t COLOR_BLUE = 0x0080FF; // Blue
|
|
||||||
static const uint32_t COLOR_PANEL_DEFAULT = 0x2C2C2C; // Dark grey for panel backgrounds
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,89 +0,0 @@
|
||||||
#ifndef G24WHEELBUTTONS_HPP
|
|
||||||
#define G24WHEELBUTTONS_HPP
|
|
||||||
|
|
||||||
#include "common/common_libraries.hpp"
|
|
||||||
#include "led_strip.hpp"
|
|
||||||
#include "data_processor.hpp"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "freertos/semphr.h"
|
|
||||||
#include "freertos/task.h"
|
|
||||||
|
|
||||||
#include "can.hpp"
|
|
||||||
|
|
||||||
#define B1_PIN GPIO_NUM_2
|
|
||||||
#define B2_PIN GPIO_NUM_4
|
|
||||||
#define B3_PIN GPIO_NUM_42
|
|
||||||
#define B4_PIN GPIO_NUM_40
|
|
||||||
|
|
||||||
#define B1_LED_PIN GPIO_NUM_3
|
|
||||||
#define B2_LED_PIN GPIO_NUM_5
|
|
||||||
#define B3_LED_PIN GPIO_NUM_41
|
|
||||||
#define B4_LED_PIN GPIO_NUM_39
|
|
||||||
|
|
||||||
#define LEVA_IZQ_PIN GPIO_NUM_15
|
|
||||||
#define LEVA_DER_PIN GPIO_NUM_16
|
|
||||||
|
|
||||||
#define E1_PIN_A GPIO_NUM_11
|
|
||||||
#define E1_PIN_B GPIO_NUM_10
|
|
||||||
#define E2_PIN_A GPIO_NUM_36
|
|
||||||
#define E2_PIN_B GPIO_NUM_35
|
|
||||||
|
|
||||||
#define E1_BUTTON_PIN GPIO_NUM_12
|
|
||||||
#define E2_BUTTON_PIN GPIO_NUM_34
|
|
||||||
|
|
||||||
class G24WheelButtons {
|
|
||||||
public:
|
|
||||||
G24WheelButtons();
|
|
||||||
void begin();
|
|
||||||
void update();
|
|
||||||
static void updateTask(void *arg);
|
|
||||||
void set_can_controller(CAN *canController);
|
|
||||||
void set_led_strip(LedStrip *ledStrip);
|
|
||||||
void set_data_processor(DataProcessor *dataProcessor);
|
|
||||||
|
|
||||||
private:
|
|
||||||
LedStrip *_led_strip;
|
|
||||||
DataProcessor *_data_processor;
|
|
||||||
void handleButtonPress(gpio_num_t buttonPin);
|
|
||||||
void handleButtonRelease(gpio_num_t buttonPin);
|
|
||||||
static void IRAM_ATTR handleEncoderInterrupt(void* arg);
|
|
||||||
void handleClockWise(gpio_num_t encoderPin);
|
|
||||||
void handleCounterClockWise(gpio_num_t encoderPin);
|
|
||||||
void checkButtonState(gpio_num_t buttonPin, volatile bool &buttonState, volatile unsigned long &lastPressTime, int ledPin);
|
|
||||||
|
|
||||||
static const unsigned long debounceTime = 50; // milliseconds
|
|
||||||
volatile unsigned long lastPressTimeB1;
|
|
||||||
volatile unsigned long lastPressTimeB2;
|
|
||||||
volatile unsigned long lastPressTimeB3;
|
|
||||||
volatile unsigned long lastPressTimeB4;
|
|
||||||
volatile unsigned long lastPressTimeLevaIzq;
|
|
||||||
volatile unsigned long lastPressTimeLevaDer;
|
|
||||||
volatile unsigned long lastPressTimeE1;
|
|
||||||
volatile unsigned long lastPressTimeE2;
|
|
||||||
volatile unsigned long lastTurnTimeE1;
|
|
||||||
volatile unsigned long lastTurnTimeE2;
|
|
||||||
|
|
||||||
volatile bool buttonStateB1;
|
|
||||||
volatile bool buttonStateB2;
|
|
||||||
volatile bool buttonStateB3;
|
|
||||||
volatile bool buttonStateB4;
|
|
||||||
volatile bool buttonStateLevaIzq;
|
|
||||||
volatile bool buttonStateLevaDer;
|
|
||||||
volatile int encoderCounterE1;
|
|
||||||
volatile int encoderCounterE2;
|
|
||||||
volatile bool buttonStateE1;
|
|
||||||
volatile bool buttonStateE2;
|
|
||||||
|
|
||||||
volatile int displayCounter;
|
|
||||||
volatile int lastDispayCounter;
|
|
||||||
|
|
||||||
volatile int brightnessCounter;
|
|
||||||
volatile int lastBrightnessCounter;
|
|
||||||
|
|
||||||
volatile int lastPin_A_StateE1;
|
|
||||||
volatile int lastPin_A_StateE2;
|
|
||||||
|
|
||||||
CAN* canController;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Binary file not shown.
|
|
@ -1,53 +0,0 @@
|
||||||
#ifndef LED_STRIP_HPP
|
|
||||||
#define LED_STRIP_HPP
|
|
||||||
|
|
||||||
#include <Adafruit_NeoPixel.h>
|
|
||||||
|
|
||||||
#define PIN_WS2812B 6
|
|
||||||
#define NUM_PIXELS 18
|
|
||||||
|
|
||||||
#define STOP_CAR_WARNING 1
|
|
||||||
|
|
||||||
#define RPM_MIN 6000
|
|
||||||
#define RPM_MAX 11000
|
|
||||||
|
|
||||||
class LedStrip{
|
|
||||||
public:
|
|
||||||
LedStrip(): _ws2812b(NUM_PIXELS, PIN_WS2812B, NEO_GRB + NEO_KHZ800), _warning(0), _brightness(255) {}
|
|
||||||
|
|
||||||
static void updateTask(void *arg) {
|
|
||||||
LedStrip *ledStrip = static_cast<LedStrip*>(arg);
|
|
||||||
ledStrip->update();
|
|
||||||
vTaskDelete(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void update();
|
|
||||||
|
|
||||||
void set_rpm(int rpm);
|
|
||||||
|
|
||||||
void begin(){
|
|
||||||
_ws2812b.begin();
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_brightness(uint8_t brightness) {
|
|
||||||
_ws2812b.setBrightness(brightness);
|
|
||||||
_ws2812b.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_mutex(SemaphoreHandle_t mutex){
|
|
||||||
_mutex = mutex;
|
|
||||||
}
|
|
||||||
|
|
||||||
void display_warning(int warning);
|
|
||||||
void display_rpm(int rpm);
|
|
||||||
void display_startup();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Adafruit_NeoPixel _ws2812b;
|
|
||||||
SemaphoreHandle_t _mutex;
|
|
||||||
int _rpm;
|
|
||||||
int _warning;
|
|
||||||
int _brightness;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Binary file not shown.
|
|
@ -1,55 +0,0 @@
|
||||||
// #ifndef LED_STRIP_HPP
|
|
||||||
// #define LED_STRIP_HPP
|
|
||||||
|
|
||||||
// #include <FastLED.h>
|
|
||||||
|
|
||||||
// #define PIN_WS2812B 6
|
|
||||||
// #define NUM_PIXELS 18
|
|
||||||
|
|
||||||
// #define STOP_CAR_WARNING 1
|
|
||||||
|
|
||||||
// #define RPM_MIN 6000
|
|
||||||
// #define RPM_MAX 11000
|
|
||||||
|
|
||||||
// class LedStrip{
|
|
||||||
// public:
|
|
||||||
// LedStrip(): _warning(0), _brightness(255) {}
|
|
||||||
|
|
||||||
// static void updateTask(void *arg) {
|
|
||||||
// LedStrip *ledStrip = static_cast<LedStrip*>(arg);
|
|
||||||
// ledStrip->update();
|
|
||||||
// vTaskDelete(NULL);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void update();
|
|
||||||
|
|
||||||
// void set_rpm(int rpm);
|
|
||||||
|
|
||||||
// void begin(){
|
|
||||||
// FastLED.addLeds<WS2812B, PIN_WS2812B, GRB>(_leds, NUM_PIXELS);
|
|
||||||
// FastLED.setBrightness(_brightness);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void set_brightness(uint8_t brightness) {
|
|
||||||
// _brightness = brightness;
|
|
||||||
// FastLED.setBrightness(_brightness);
|
|
||||||
// FastLED.show();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void set_mutex(SemaphoreHandle_t mutex){
|
|
||||||
// _mutex = mutex;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void display_warning(int warning);
|
|
||||||
// void display_rpm(int rpm);
|
|
||||||
// void display_startup();
|
|
||||||
|
|
||||||
// private:
|
|
||||||
// CRGB _leds[NUM_PIXELS];
|
|
||||||
// SemaphoreHandle_t _mutex;
|
|
||||||
// int _rpm;
|
|
||||||
// int _warning;
|
|
||||||
// int _brightness;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// #endif
|
|
||||||
Binary file not shown.
|
|
@ -1,61 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#ifndef _SQUARELINE_PROJECT_UI_H
|
|
||||||
#define _SQUARELINE_PROJECT_UI_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined __has_include
|
|
||||||
#if __has_include("lvgl.h")
|
|
||||||
#include "lvgl.h"
|
|
||||||
#elif __has_include("lvgl/lvgl.h")
|
|
||||||
#include "lvgl/lvgl.h"
|
|
||||||
#else
|
|
||||||
#include "lvgl.h"
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#include "lvgl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ui_helpers.h"
|
|
||||||
#include "ui_events.h"
|
|
||||||
|
|
||||||
///////////////////// SCREENS ////////////////////
|
|
||||||
|
|
||||||
#include "ui_Screen1.h"
|
|
||||||
#include "ui_Screen2.h"
|
|
||||||
#include "ui_Screen3.h"
|
|
||||||
#include "ui_Screen4.h"
|
|
||||||
|
|
||||||
///////////////////// VARIABLES ////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// EVENTS
|
|
||||||
|
|
||||||
extern lv_obj_t * ui____initial_actions0;
|
|
||||||
|
|
||||||
// FONTS
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas30);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas35);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas200);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas300);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas350);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas150);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas80);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas60);
|
|
||||||
LV_FONT_DECLARE(ui_font_Consolas50);
|
|
||||||
|
|
||||||
// UI INIT
|
|
||||||
void ui_init(void);
|
|
||||||
void ui_destroy(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /*extern "C"*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Binary file not shown.
|
|
@ -1,59 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#ifndef UI_SCREEN1_H
|
|
||||||
#define UI_SCREEN1_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// SCREEN: ui_Screen1
|
|
||||||
extern void ui_Screen1_screen_init(void);
|
|
||||||
extern void ui_Screen1_screen_destroy(void);
|
|
||||||
extern lv_obj_t * ui_Screen1;
|
|
||||||
extern lv_obj_t * ui_PanelGear;
|
|
||||||
extern lv_obj_t * ui_gear;
|
|
||||||
extern lv_obj_t * ui_PanelRPM;
|
|
||||||
extern lv_obj_t * ui_rpm;
|
|
||||||
extern lv_obj_t * ui_PanelBATT;
|
|
||||||
extern lv_obj_t * ui_battvoltlabel;
|
|
||||||
extern lv_obj_t * ui_battvolt;
|
|
||||||
extern lv_obj_t * ui_PanelETC;
|
|
||||||
extern lv_obj_t * ui_ect;
|
|
||||||
extern lv_obj_t * ui_ECTlabel;
|
|
||||||
extern lv_obj_t * ui_PanelSHUTDOWN;
|
|
||||||
extern lv_obj_t * ui_SHUTDOWN_LABEL;
|
|
||||||
extern lv_obj_t * ui_shutdown;
|
|
||||||
extern lv_obj_t * ui_PanelFAN;
|
|
||||||
extern lv_obj_t * ui_FANLabel;
|
|
||||||
extern lv_obj_t * ui_fan;
|
|
||||||
|
|
||||||
// RPM LED Bar - 16 mini panels
|
|
||||||
extern lv_obj_t * ui_RPMBar1;
|
|
||||||
extern lv_obj_t * ui_RPMBar2;
|
|
||||||
extern lv_obj_t * ui_RPMBar3;
|
|
||||||
extern lv_obj_t * ui_RPMBar4;
|
|
||||||
extern lv_obj_t * ui_RPMBar5;
|
|
||||||
extern lv_obj_t * ui_RPMBar6;
|
|
||||||
extern lv_obj_t * ui_RPMBar7;
|
|
||||||
extern lv_obj_t * ui_RPMBar8;
|
|
||||||
extern lv_obj_t * ui_RPMBar9;
|
|
||||||
extern lv_obj_t * ui_RPMBar10;
|
|
||||||
extern lv_obj_t * ui_RPMBar11;
|
|
||||||
extern lv_obj_t * ui_RPMBar12;
|
|
||||||
extern lv_obj_t * ui_RPMBar13;
|
|
||||||
extern lv_obj_t * ui_RPMBar14;
|
|
||||||
extern lv_obj_t * ui_RPMBar15;
|
|
||||||
extern lv_obj_t * ui_RPMBar16;
|
|
||||||
|
|
||||||
// CUSTOM VARIABLES
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /*extern "C"*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Binary file not shown.
|
|
@ -1,41 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#ifndef UI_SCREEN2_H
|
|
||||||
#define UI_SCREEN2_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// SCREEN: ui_Screen2
|
|
||||||
extern void ui_Screen2_screen_init(void);
|
|
||||||
extern void ui_Screen2_screen_destroy(void);
|
|
||||||
extern lv_obj_t * ui_Screen2;
|
|
||||||
extern lv_obj_t * ui_fueltitlepanel;
|
|
||||||
extern lv_obj_t * ui_fuellabeltitle;
|
|
||||||
extern lv_obj_t * ui_PanelLambda;
|
|
||||||
extern lv_obj_t * ui_lambda;
|
|
||||||
extern lv_obj_t * ui_LambdaLabel;
|
|
||||||
extern lv_obj_t * ui_PanelLambdatarget;
|
|
||||||
extern lv_obj_t * ui_lambdatarget;
|
|
||||||
extern lv_obj_t * ui_LambdaLabel1;
|
|
||||||
extern lv_obj_t * ui_Panelfuel;
|
|
||||||
extern lv_obj_t * ui_FUELLabel;
|
|
||||||
extern lv_obj_t * ui_fuel;
|
|
||||||
extern lv_obj_t * ui_PaneLCorrlamb;
|
|
||||||
extern lv_obj_t * ui_CORRLAMBDALabel1;
|
|
||||||
extern lv_obj_t * ui_correctionlambda;
|
|
||||||
extern lv_obj_t * ui_PanelETC2;
|
|
||||||
extern lv_obj_t * ui_ect2;
|
|
||||||
extern lv_obj_t * ui_ECTlabel2;
|
|
||||||
// CUSTOM VARIABLES
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /*extern "C"*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Binary file not shown.
|
|
@ -1,56 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#ifndef UI_SCREEN3_H
|
|
||||||
#define UI_SCREEN3_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// SCREEN: ui_Screen3
|
|
||||||
extern void ui_Screen3_screen_init(void);
|
|
||||||
extern void ui_Screen3_screen_destroy(void);
|
|
||||||
extern lv_obj_t * ui_Screen3;
|
|
||||||
extern lv_obj_t * ui_fueltitlepanel2;
|
|
||||||
extern lv_obj_t * ui_fuellabeltitle2;
|
|
||||||
extern lv_obj_t * ui_PanelAUX1;
|
|
||||||
extern lv_obj_t * ui_AUXLabel1;
|
|
||||||
extern lv_obj_t * ui_auxstatus1;
|
|
||||||
extern lv_obj_t * ui_PanelAUX2;
|
|
||||||
extern lv_obj_t * ui_AUXLabel2;
|
|
||||||
extern lv_obj_t * ui_auxstatus2;
|
|
||||||
extern lv_obj_t * ui_PanelAUX3;
|
|
||||||
extern lv_obj_t * ui_AUXLabel3;
|
|
||||||
extern lv_obj_t * ui_auxstatus3;
|
|
||||||
extern lv_obj_t * ui_PanelAUX4;
|
|
||||||
extern lv_obj_t * ui_AUXLabel4;
|
|
||||||
extern lv_obj_t * ui_auxstatus4;
|
|
||||||
extern lv_obj_t * ui_PanelAUX5;
|
|
||||||
extern lv_obj_t * ui_AUXLabel5;
|
|
||||||
extern lv_obj_t * ui_auxstatus5;
|
|
||||||
extern lv_obj_t * ui_PanelAUX6;
|
|
||||||
extern lv_obj_t * ui_AUXLabel6;
|
|
||||||
extern lv_obj_t * ui_auxstatus6;
|
|
||||||
extern lv_obj_t * ui_PanelAUX7;
|
|
||||||
extern lv_obj_t * ui_AUXLabel7;
|
|
||||||
extern lv_obj_t * ui_auxstatus7;
|
|
||||||
extern lv_obj_t * ui_PanelAUX8;
|
|
||||||
extern lv_obj_t * ui_AUXLabel8;
|
|
||||||
extern lv_obj_t * ui_auxstatus8;
|
|
||||||
extern lv_obj_t * ui_PanelAUX9;
|
|
||||||
extern lv_obj_t * ui_AUXLabel9;
|
|
||||||
extern lv_obj_t * ui_auxstatus9;
|
|
||||||
extern lv_obj_t * ui_PanelAUX10;
|
|
||||||
extern lv_obj_t * ui_AUXLabel10;
|
|
||||||
extern lv_obj_t * ui_auxstatus10;
|
|
||||||
// CUSTOM VARIABLES
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /*extern "C"*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Binary file not shown.
|
|
@ -1,56 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#ifndef UI_SCREEN4_H
|
|
||||||
#define UI_SCREEN4_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// SCREEN: ui_Screen4
|
|
||||||
extern void ui_Screen4_screen_init(void);
|
|
||||||
extern void ui_Screen4_screen_destroy(void);
|
|
||||||
extern lv_obj_t * ui_Screen4;
|
|
||||||
extern lv_obj_t * ui_fueltitlepanel3;
|
|
||||||
extern lv_obj_t * ui_fuellabeltitle3;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL1;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel1;
|
|
||||||
extern lv_obj_t * ui_digitalstatus1;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL2;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel2;
|
|
||||||
extern lv_obj_t * ui_digitalstatus2;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL3;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel3;
|
|
||||||
extern lv_obj_t * ui_digitalstatus3;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL4;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel4;
|
|
||||||
extern lv_obj_t * ui_digitalstatus4;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL5;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel5;
|
|
||||||
extern lv_obj_t * ui_digitalstatus5;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL6;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel6;
|
|
||||||
extern lv_obj_t * ui_digitalstatus6;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL7;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel7;
|
|
||||||
extern lv_obj_t * ui_digitalstatus7;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL8;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel8;
|
|
||||||
extern lv_obj_t * ui_digitalstatus8;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL9;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel9;
|
|
||||||
extern lv_obj_t * ui_digitalstatus9;
|
|
||||||
extern lv_obj_t * ui_PanelDIGITAL10;
|
|
||||||
extern lv_obj_t * ui_DIGITALLabel10;
|
|
||||||
extern lv_obj_t * ui_digitalstatus10;
|
|
||||||
// CUSTOM VARIABLES
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /*extern "C"*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Binary file not shown.
|
|
@ -1,17 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#ifndef _UI_EVENTS_H
|
|
||||||
#define _UI_EVENTS_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /*extern "C"*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Binary file not shown.
|
|
@ -1,148 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#ifndef _SQUARELINE_PROJECT_UI_HELPERS_H
|
|
||||||
#define _SQUARELINE_PROJECT_UI_HELPERS_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ui.h"
|
|
||||||
|
|
||||||
#define _UI_TEMPORARY_STRING_BUFFER_SIZE 32
|
|
||||||
#define _UI_BAR_PROPERTY_VALUE 0
|
|
||||||
#define _UI_BAR_PROPERTY_VALUE_WITH_ANIM 1
|
|
||||||
void _ui_bar_set_property(lv_obj_t * target, int id, int val);
|
|
||||||
|
|
||||||
#define _UI_BASIC_PROPERTY_POSITION_X 0
|
|
||||||
#define _UI_BASIC_PROPERTY_POSITION_Y 1
|
|
||||||
#define _UI_BASIC_PROPERTY_WIDTH 2
|
|
||||||
#define _UI_BASIC_PROPERTY_HEIGHT 3
|
|
||||||
void _ui_basic_set_property(lv_obj_t * target, int id, int val);
|
|
||||||
|
|
||||||
#define _UI_DROPDOWN_PROPERTY_SELECTED 0
|
|
||||||
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val);
|
|
||||||
|
|
||||||
#define _UI_IMAGE_PROPERTY_IMAGE 0
|
|
||||||
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val);
|
|
||||||
|
|
||||||
#define _UI_LABEL_PROPERTY_TEXT 0
|
|
||||||
void _ui_label_set_property(lv_obj_t * target, int id, const char * val);
|
|
||||||
|
|
||||||
#define _UI_ROLLER_PROPERTY_SELECTED 0
|
|
||||||
#define _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM 1
|
|
||||||
void _ui_roller_set_property(lv_obj_t * target, int id, int val);
|
|
||||||
|
|
||||||
#define _UI_SLIDER_PROPERTY_VALUE 0
|
|
||||||
#define _UI_SLIDER_PROPERTY_VALUE_WITH_ANIM 1
|
|
||||||
void _ui_slider_set_property(lv_obj_t * target, int id, int val);
|
|
||||||
|
|
||||||
void _ui_screen_change(lv_obj_t ** target, lv_scr_load_anim_t fademode, int spd, int delay, void (*target_init)(void));
|
|
||||||
|
|
||||||
void _ui_screen_delete(lv_obj_t ** target);
|
|
||||||
|
|
||||||
void _ui_arc_increment(lv_obj_t * target, int val);
|
|
||||||
|
|
||||||
void _ui_bar_increment(lv_obj_t * target, int val, int anm);
|
|
||||||
|
|
||||||
void _ui_slider_increment(lv_obj_t * target, int val, int anm);
|
|
||||||
|
|
||||||
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea);
|
|
||||||
|
|
||||||
#define _UI_MODIFY_FLAG_ADD 0
|
|
||||||
#define _UI_MODIFY_FLAG_REMOVE 1
|
|
||||||
#define _UI_MODIFY_FLAG_TOGGLE 2
|
|
||||||
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value);
|
|
||||||
|
|
||||||
#define _UI_MODIFY_STATE_ADD 0
|
|
||||||
#define _UI_MODIFY_STATE_REMOVE 1
|
|
||||||
#define _UI_MODIFY_STATE_TOGGLE 2
|
|
||||||
void _ui_state_modify(lv_obj_t * target, int32_t state, int value);
|
|
||||||
|
|
||||||
#define UI_MOVE_CURSOR_UP 0
|
|
||||||
#define UI_MOVE_CURSOR_RIGHT 1
|
|
||||||
#define UI_MOVE_CURSOR_DOWN 2
|
|
||||||
#define UI_MOVE_CURSOR_LEFT 3
|
|
||||||
void _ui_textarea_move_cursor(lv_obj_t * target, int val)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
void scr_unloaded_delete_cb(lv_event_t * e);
|
|
||||||
|
|
||||||
void _ui_opacity_set(lv_obj_t * target, int val);
|
|
||||||
|
|
||||||
/** Describes an animation*/
|
|
||||||
typedef struct _ui_anim_user_data_t {
|
|
||||||
lv_obj_t * target;
|
|
||||||
lv_img_dsc_t ** imgset;
|
|
||||||
int32_t imgset_size;
|
|
||||||
int32_t val;
|
|
||||||
} ui_anim_user_data_t;
|
|
||||||
void _ui_anim_callback_free_user_data(lv_anim_t * a);
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_image_frame(lv_anim_t * a, int32_t v);
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_x(lv_anim_t * a);
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_y(lv_anim_t * a);
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_width(lv_anim_t * a);
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_height(lv_anim_t * a);
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a);
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a);
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a);
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t * a);
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix);
|
|
||||||
|
|
||||||
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix);
|
|
||||||
|
|
||||||
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * txt_on, const char * txt_off);
|
|
||||||
|
|
||||||
void _ui_spinbox_step(lv_obj_t * target, int val)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_switch_theme(int val)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /*extern "C"*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,191 +0,0 @@
|
||||||
#include "../include/crowpanel_controller.hpp"
|
|
||||||
|
|
||||||
uint32_t CrowPanelController::screenWidth;
|
|
||||||
uint32_t CrowPanelController::screenHeight;
|
|
||||||
lv_disp_draw_buf_t CrowPanelController::draw_buf;
|
|
||||||
lv_color_t CrowPanelController::disp_draw_buf[800 * 480 / 10];
|
|
||||||
lv_disp_drv_t CrowPanelController::disp_drv;
|
|
||||||
lv_indev_drv_t CrowPanelController::indev_drv;
|
|
||||||
|
|
||||||
CrowPanelController::CrowPanelController()
|
|
||||||
{
|
|
||||||
Wire.begin(19, 20);
|
|
||||||
pinMode(38, OUTPUT);
|
|
||||||
digitalWrite(38, LOW);
|
|
||||||
lcd.begin();
|
|
||||||
lcd.setRotation(2); // Rotate display 180 degrees (upside down)
|
|
||||||
lcd.fillScreen(TFT_BLACK);
|
|
||||||
delay(200);
|
|
||||||
|
|
||||||
lv_init();
|
|
||||||
|
|
||||||
screenWidth = lcd.width();
|
|
||||||
screenHeight = lcd.height();
|
|
||||||
lv_disp_draw_buf_init(&draw_buf, disp_draw_buf, NULL, screenWidth * screenHeight / 10);
|
|
||||||
lv_disp_drv_init(&disp_drv);
|
|
||||||
|
|
||||||
disp_drv.user_data = this;
|
|
||||||
disp_drv.flush_cb = my_disp_flush;
|
|
||||||
disp_drv.draw_buf = &draw_buf;
|
|
||||||
disp_drv.hor_res = screenWidth;
|
|
||||||
disp_drv.ver_res = screenHeight;
|
|
||||||
|
|
||||||
lv_disp_drv_register(&disp_drv);
|
|
||||||
|
|
||||||
lv_indev_drv_init(&indev_drv);
|
|
||||||
indev_drv.type = LV_INDEV_TYPE_POINTER;
|
|
||||||
|
|
||||||
lv_indev_drv_register(&indev_drv);
|
|
||||||
pinMode(TFT_BL, OUTPUT);
|
|
||||||
digitalWrite(TFT_BL, HIGH);
|
|
||||||
ui_init();
|
|
||||||
|
|
||||||
// Initialize RPM bar panels with default dark style
|
|
||||||
set_panel_default_style(ui_RPMBar1);
|
|
||||||
set_panel_default_style(ui_RPMBar2);
|
|
||||||
set_panel_default_style(ui_RPMBar3);
|
|
||||||
set_panel_default_style(ui_RPMBar4);
|
|
||||||
set_panel_default_style(ui_RPMBar5);
|
|
||||||
set_panel_default_style(ui_RPMBar6);
|
|
||||||
set_panel_default_style(ui_RPMBar7);
|
|
||||||
set_panel_default_style(ui_RPMBar8);
|
|
||||||
set_panel_default_style(ui_RPMBar9);
|
|
||||||
set_panel_default_style(ui_RPMBar10);
|
|
||||||
set_panel_default_style(ui_RPMBar11);
|
|
||||||
set_panel_default_style(ui_RPMBar12);
|
|
||||||
set_panel_default_style(ui_RPMBar13);
|
|
||||||
set_panel_default_style(ui_RPMBar14);
|
|
||||||
set_panel_default_style(ui_RPMBar15);
|
|
||||||
set_panel_default_style(ui_RPMBar16);
|
|
||||||
|
|
||||||
lv_timer_handler();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CrowPanelController::my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
|
|
||||||
{
|
|
||||||
CrowPanelController* controller = static_cast<CrowPanelController*>(disp->user_data);
|
|
||||||
LGFX& lcd = controller->lcd;
|
|
||||||
|
|
||||||
uint32_t w = (area->x2 - area->x1 + 1);
|
|
||||||
uint32_t h = (area->y2 - area->y1 + 1);
|
|
||||||
|
|
||||||
#if (LV_COLOR_16_SWAP != 0)
|
|
||||||
lcd.pushImageDMA(area->x1, area->y1, w, h, (lgfx::rgb565_t*)&color_p->full);
|
|
||||||
#else
|
|
||||||
lcd.pushImageDMA(area->x1, area->y1, w, h, (lgfx::rgb565_t*)&color_p->full);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lv_disp_flush_ready(disp);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CrowPanelController::set_value_to_label(lv_obj_t *label, double value)
|
|
||||||
{
|
|
||||||
if (value == (int)value) {
|
|
||||||
lv_label_set_text_fmt(label, "%d", (int)value);
|
|
||||||
} else {
|
|
||||||
char buffer[10];
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.2f", value);
|
|
||||||
lv_label_set_text(label, buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CrowPanelController::set_string_to_label(lv_obj_t *label, const char *string){
|
|
||||||
lv_label_set_text(label, string);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CrowPanelController::change_screen(lv_obj_t *screen){
|
|
||||||
if (screen != NULL) {
|
|
||||||
lv_disp_load_scr(screen);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// New color management methods
|
|
||||||
void CrowPanelController::set_label_color(lv_obj_t *label, uint32_t color) {
|
|
||||||
if (label != NULL) {
|
|
||||||
lv_obj_set_style_text_color(label, lv_color_hex(color), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*void CrowPanelController::set_panel_color(lv_obj_t *panel, uint32_t bg_color) {
|
|
||||||
if (panel != NULL) {
|
|
||||||
lv_obj_set_style_bg_color(panel, lv_color_hex(bg_color), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
// IMPORTANTE: Asegura que el fondo sea totalmente visible (opacidad 255)
|
|
||||||
// Si esto estaba en 0 o 50, el color nuevo no se vería bien.
|
|
||||||
lv_obj_set_style_bg_opa(panel, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
void CrowPanelController::set_panel_color(lv_obj_t *panel, uint32_t bg_color) {
|
|
||||||
if (panel != NULL) {
|
|
||||||
// 1. COPIAMOS la lógica de opacidad de la función default
|
|
||||||
// LV_OPA_COVER significa 100% opaco (es lo mismo que 255)
|
|
||||||
lv_obj_set_style_bg_opa(panel, LV_OPA_COVER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
// 2. Aplicamos el color que queremos (Rojo, Verde, etc.)
|
|
||||||
lv_obj_set_style_bg_color(panel, lv_color_hex(bg_color), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
// 3. Mantenemos el borde bonito (opcional, pero recomendado para consistencia)
|
|
||||||
lv_obj_set_style_border_width(panel, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_border_color(panel, lv_color_hex(0x404040), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CrowPanelController::set_conditional_colors() {
|
|
||||||
// This method will be called from data_processor.cpp to update colors based on conditions
|
|
||||||
// Implementation will be added when specific conditions are defined
|
|
||||||
}
|
|
||||||
|
|
||||||
void CrowPanelController::set_panel_default_style(lv_obj_t *panel) {
|
|
||||||
if (panel != NULL) {
|
|
||||||
lv_obj_set_style_bg_color(panel, lv_color_hex(COLOR_PANEL_DEFAULT), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_bg_opa(panel, LV_OPA_COVER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_border_width(panel, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_border_color(panel, lv_color_hex(0x404040), LV_PART_MAIN | LV_STATE_DEFAULT); // Slightly lighter border
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CrowPanelController::update_rpm_bar(int rpm) {
|
|
||||||
// RPM range: 8000-12500 (4500 RPM total)
|
|
||||||
// 16 panels: each represents 281.25 RPM (4500/16)
|
|
||||||
// Colors: 1-6 green, 7-12 yellow, 13-16 red
|
|
||||||
|
|
||||||
// Array of all RPM bar panels for easy iteration
|
|
||||||
lv_obj_t* rpm_bars[16] = {
|
|
||||||
ui_RPMBar1, ui_RPMBar2, ui_RPMBar3, ui_RPMBar4,
|
|
||||||
ui_RPMBar5, ui_RPMBar6, ui_RPMBar7, ui_RPMBar8,
|
|
||||||
ui_RPMBar9, ui_RPMBar10, ui_RPMBar11, ui_RPMBar12,
|
|
||||||
ui_RPMBar13, ui_RPMBar14, ui_RPMBar15, ui_RPMBar16
|
|
||||||
};
|
|
||||||
|
|
||||||
// Calculate how many panels should be lit based on RPM
|
|
||||||
int panels_to_light = 0;
|
|
||||||
if (rpm >= 8000) {
|
|
||||||
// RPM above 8000, calculate how many panels to light
|
|
||||||
int rpm_above_8000 = rpm - 8000;
|
|
||||||
if (rpm_above_8000 > 4500) rpm_above_8000 = 4500; // Cap at 12500 RPM
|
|
||||||
panels_to_light = (rpm_above_8000 * 16) / 4500; // 16 panels over 4500 RPM range
|
|
||||||
if (panels_to_light > 16) panels_to_light = 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update each panel based on its position and RPM
|
|
||||||
for (int i = 0; i < 16; i++) {
|
|
||||||
if (rpm_bars[i] != NULL) {
|
|
||||||
if (i < panels_to_light) {
|
|
||||||
// Panel should be lit - determine color based on position
|
|
||||||
if (i < 6) {
|
|
||||||
// Panels 1-6: Green (safe zone)
|
|
||||||
set_panel_color(rpm_bars[i], COLOR_GOOD);
|
|
||||||
} else if (i < 12) {
|
|
||||||
// Panels 7-12: Yellow (warning zone)
|
|
||||||
set_panel_color(rpm_bars[i], COLOR_WARNING);
|
|
||||||
} else {
|
|
||||||
// Panels 13-16: Red (danger zone)
|
|
||||||
set_panel_color(rpm_bars[i], COLOR_CRITICAL);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Panel should be off - dark grey
|
|
||||||
set_panel_color(rpm_bars[i], COLOR_PANEL_DEFAULT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,206 +0,0 @@
|
||||||
#include "../include/g24_wheel_buttons.hpp"
|
|
||||||
|
|
||||||
G24WheelButtons::G24WheelButtons()
|
|
||||||
: lastPressTimeB1(0), lastPressTimeB2(0), lastPressTimeB3(0), lastPressTimeB4(0),
|
|
||||||
lastPressTimeLevaIzq(0), lastPressTimeLevaDer(0),
|
|
||||||
buttonStateB1(false), buttonStateB2(false), buttonStateB3(false), buttonStateB4(false),
|
|
||||||
buttonStateLevaIzq(false), buttonStateLevaDer(false), canController(nullptr), lastTurnTimeE1(255), lastTurnTimeE2(0),
|
|
||||||
encoderCounterE1(255), encoderCounterE2(0),
|
|
||||||
lastPin_A_StateE1(255), lastPin_A_StateE2(0), displayCounter(0), lastDispayCounter(0), brightnessCounter(0), lastBrightnessCounter(0), lastPressTimeE1(0), lastPressTimeE2(0), buttonStateE1(false), buttonStateE2(false) {}
|
|
||||||
|
|
||||||
void G24WheelButtons::begin() {
|
|
||||||
pinMode(B1_PIN, INPUT_PULLUP);
|
|
||||||
pinMode(B2_PIN, INPUT_PULLUP);
|
|
||||||
pinMode(B3_PIN, INPUT_PULLUP);
|
|
||||||
pinMode(B4_PIN, INPUT_PULLUP);
|
|
||||||
pinMode(LEVA_IZQ_PIN, INPUT_PULLUP);
|
|
||||||
pinMode(LEVA_DER_PIN, INPUT_PULLUP);
|
|
||||||
|
|
||||||
pinMode(B1_LED_PIN, OUTPUT);
|
|
||||||
pinMode(B2_LED_PIN, OUTPUT);
|
|
||||||
pinMode(B3_LED_PIN, OUTPUT);
|
|
||||||
pinMode(B4_LED_PIN, OUTPUT);
|
|
||||||
pinMode(E1_PIN_A, INPUT);
|
|
||||||
pinMode(E1_PIN_B, INPUT);
|
|
||||||
pinMode(E2_PIN_A, INPUT);
|
|
||||||
pinMode(E2_PIN_B, INPUT);
|
|
||||||
pinMode(E1_BUTTON_PIN, INPUT_PULLUP);
|
|
||||||
pinMode(E2_BUTTON_PIN, INPUT_PULLUP);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// attachInterruptArg(digitalPinToInterrupt(E1_PIN_A), handleEncoderInterrupt, this, CHANGE);
|
|
||||||
// attachInterruptArg(digitalPinToInterrupt(E2_PIN_A), handleEncoderInterrupt, this, CHANGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void IRAM_ATTR G24WheelButtons::handleEncoderInterrupt(void* arg) {
|
|
||||||
G24WheelButtons* instance = static_cast<G24WheelButtons*>(arg);
|
|
||||||
gpio_num_t encoderPin_A = E1_PIN_A;
|
|
||||||
gpio_num_t encoderPin_B = E1_PIN_B;
|
|
||||||
|
|
||||||
int pin_A_State = gpio_get_level(encoderPin_A);
|
|
||||||
int pin_B_State = gpio_get_level(encoderPin_B);
|
|
||||||
|
|
||||||
if (pin_A_State != instance->lastPin_A_StateE1) {
|
|
||||||
if (pin_B_State != pin_A_State) {
|
|
||||||
instance->handleClockWise(encoderPin_A);
|
|
||||||
} else {
|
|
||||||
instance->handleCounterClockWise(encoderPin_A);
|
|
||||||
}
|
|
||||||
instance->lastPin_A_StateE1 = pin_A_State;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::checkButtonState(gpio_num_t buttonPin, volatile bool &buttonState, volatile unsigned long &lastPressTime, int ledPin) {
|
|
||||||
int currentState = digitalRead(buttonPin);
|
|
||||||
unsigned long currentTime = millis();
|
|
||||||
|
|
||||||
if (currentState == LOW && !buttonState) { // Button pressed
|
|
||||||
if (currentTime - lastPressTime > debounceTime) {
|
|
||||||
lastPressTime = currentTime;
|
|
||||||
buttonState = true;
|
|
||||||
if (ledPin != -1) {
|
|
||||||
digitalWrite(ledPin, HIGH);
|
|
||||||
}
|
|
||||||
if(buttonPin == B2_PIN){
|
|
||||||
if(displayCounter < 4){
|
|
||||||
displayCounter++;
|
|
||||||
}else{
|
|
||||||
displayCounter = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(buttonPin == LEVA_IZQ_PIN){
|
|
||||||
Serial.println("LEVA IZQ");
|
|
||||||
}
|
|
||||||
if(buttonPin == LEVA_DER_PIN){
|
|
||||||
Serial.println("LEVA DER");
|
|
||||||
}
|
|
||||||
if(buttonPin == E1_BUTTON_PIN){
|
|
||||||
if(brightnessCounter < 2){
|
|
||||||
brightnessCounter++;
|
|
||||||
}else{
|
|
||||||
brightnessCounter = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (currentState == HIGH && buttonState) { // Button released
|
|
||||||
if (currentTime - lastPressTime > debounceTime) {
|
|
||||||
lastPressTime = currentTime;
|
|
||||||
buttonState = false;
|
|
||||||
if (ledPin != -1) {
|
|
||||||
digitalWrite(ledPin, LOW);
|
|
||||||
}
|
|
||||||
// Serial.print("Button Released: ");
|
|
||||||
// Serial.println(buttonPin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::update() {
|
|
||||||
while (true) {
|
|
||||||
checkButtonState(B1_PIN, buttonStateB1, lastPressTimeB1, B1_LED_PIN);
|
|
||||||
checkButtonState(B2_PIN, buttonStateB2, lastPressTimeB2, B2_LED_PIN);
|
|
||||||
checkButtonState(B3_PIN, buttonStateB3, lastPressTimeB3, B3_LED_PIN);
|
|
||||||
checkButtonState(B4_PIN, buttonStateB4, lastPressTimeB4, B4_LED_PIN);
|
|
||||||
checkButtonState(LEVA_IZQ_PIN, buttonStateLevaIzq, lastPressTimeLevaIzq, -1);
|
|
||||||
checkButtonState(LEVA_DER_PIN, buttonStateLevaDer, lastPressTimeLevaDer, -1);
|
|
||||||
checkButtonState(E1_BUTTON_PIN, buttonStateE1, lastPressTimeE1, -1);
|
|
||||||
|
|
||||||
canController->send_frame(canController->createBoolMessage(0, 1, buttonStateB1, 1, buttonStateB3, buttonStateB4, 1, 1));
|
|
||||||
|
|
||||||
if(brightnessCounter != lastBrightnessCounter){
|
|
||||||
switch(brightnessCounter){
|
|
||||||
case 0:
|
|
||||||
_led_strip->set_brightness(255);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
_led_strip->set_brightness(140);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
_led_strip->set_brightness(70);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
lastBrightnessCounter = brightnessCounter;
|
|
||||||
}
|
|
||||||
// Serial.print("brillo: ");
|
|
||||||
// Serial.println(brightnessCounter);
|
|
||||||
|
|
||||||
if (displayCounter != lastDispayCounter){
|
|
||||||
_data_processor->send_serial_change_display(displayCounter);
|
|
||||||
lastDispayCounter = displayCounter;
|
|
||||||
}
|
|
||||||
|
|
||||||
vTaskDelay(20); // Slightly longer delay to ensure the system is not overloaded
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::set_can_controller(CAN *canController) {
|
|
||||||
this->canController = canController;
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::handleClockWise(gpio_num_t encoderPin) {
|
|
||||||
switch (encoderPin) {
|
|
||||||
case E1_PIN_A:
|
|
||||||
if(encoderCounterE1 <= 245){
|
|
||||||
encoderCounterE1+=10;
|
|
||||||
// _led_strip->set_brightness(encoderCounterE1);
|
|
||||||
// Serial.print("brillo: ");
|
|
||||||
// Serial.println(encoderCounterE1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
// case E2_PIN_A:
|
|
||||||
// encoderCounterE2++;
|
|
||||||
// if( encoderCounterE2 % 5 == 0){
|
|
||||||
// if (displayCounter <= 4){
|
|
||||||
// displayCounter++;
|
|
||||||
// }else{
|
|
||||||
// displayCounter = 0;
|
|
||||||
// }
|
|
||||||
// // _data_processor->send_serial_change_display(displayCounter);
|
|
||||||
// // Serial.print("display: ");
|
|
||||||
// // Serial.println(displayCounter);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::handleCounterClockWise(gpio_num_t encoderPin) {
|
|
||||||
switch (encoderPin) {
|
|
||||||
case E1_PIN_A:
|
|
||||||
if(encoderCounterE1 >= 10){
|
|
||||||
encoderCounterE1-=10;
|
|
||||||
// _led_strip->set_brightness(encoderCounterE1);
|
|
||||||
Serial.print("brillo: ");
|
|
||||||
Serial.println(encoderCounterE1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
// case E2_PIN_A:
|
|
||||||
// encoderCounterE2--;
|
|
||||||
// if( encoderCounterE2 % 5 == 0){
|
|
||||||
// if (displayCounter > 0){
|
|
||||||
// displayCounter--;
|
|
||||||
// }else{
|
|
||||||
// displayCounter = 4;
|
|
||||||
// }
|
|
||||||
// // _data_processor->send_serial_change_display(displayCounter);
|
|
||||||
// // Serial.print("display: ");
|
|
||||||
// // Serial.println(displayCounter);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::updateTask(void *arg) {
|
|
||||||
vTaskDelay(2000);
|
|
||||||
G24WheelButtons *wheelButtons = static_cast<G24WheelButtons*>(arg);
|
|
||||||
wheelButtons->update();
|
|
||||||
vTaskDelete(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::set_led_strip(LedStrip *ledStrip){
|
|
||||||
_led_strip = ledStrip;
|
|
||||||
}
|
|
||||||
|
|
||||||
void G24WheelButtons::set_data_processor(DataProcessor *dataProcessor){
|
|
||||||
_data_processor = dataProcessor;
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
|
@ -1,86 +0,0 @@
|
||||||
/**
|
|
||||||
* @file led_strip.cpp
|
|
||||||
* @author Raúl Arcos Herrera
|
|
||||||
* @brief This file contains the implementation of the LED Strip class for Link G4+ ECU.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../include/led_strip.hpp"
|
|
||||||
|
|
||||||
void LedStrip::display_warning(int warning){
|
|
||||||
if(warning == STOP_CAR_WARNING){
|
|
||||||
for(int i = 0; i < NUM_PIXELS; i++){
|
|
||||||
_ws2812b.setPixelColor(i, 255, 0, 0);
|
|
||||||
}
|
|
||||||
_ws2812b.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LedStrip::set_rpm(int rpm){
|
|
||||||
display_rpm(rpm);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LedStrip::display_rpm(int rpm){
|
|
||||||
if (rpm >= RPM_MAX) {
|
|
||||||
for (int i = 0; i < NUM_PIXELS; i++) {
|
|
||||||
_ws2812b.setPixelColor(i, _ws2812b.Color(255, 0, 0));
|
|
||||||
}
|
|
||||||
_ws2812b.show();
|
|
||||||
delay(50);
|
|
||||||
for (int i = 0; i < NUM_PIXELS; i++) {
|
|
||||||
_ws2812b.setPixelColor(i, 0);
|
|
||||||
}
|
|
||||||
_ws2812b.show();
|
|
||||||
delay(50);
|
|
||||||
} else {
|
|
||||||
int numLeds = map(rpm, RPM_MIN, RPM_MAX, 0, NUM_PIXELS);
|
|
||||||
|
|
||||||
for (int i = 0; i < NUM_PIXELS; i++) {
|
|
||||||
if (i < numLeds) {
|
|
||||||
if (i < NUM_PIXELS / 3) {
|
|
||||||
_ws2812b.setPixelColor(i, _ws2812b.Color(0, 255, 0));
|
|
||||||
} else if (i < 2 * NUM_PIXELS / 3) {
|
|
||||||
_ws2812b.setPixelColor(i, _ws2812b.Color(255, 255, 0));
|
|
||||||
} else {
|
|
||||||
_ws2812b.setPixelColor(i, _ws2812b.Color(255, 0, 0));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
_ws2812b.setPixelColor(i, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ws2812b.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LedStrip::display_startup(){
|
|
||||||
_ws2812b.setBrightness(255);
|
|
||||||
uint32_t colors[3] = { _ws2812b.Color(255, 0, 0), _ws2812b.Color(0, 255, 0), _ws2812b.Color(0, 0, 255) };
|
|
||||||
|
|
||||||
for (int pass = 0; pass < 3; pass++) {
|
|
||||||
for (int i = 0; i <= NUM_PIXELS - 4; i++) {
|
|
||||||
_ws2812b.clear();
|
|
||||||
_ws2812b.show();
|
|
||||||
for (int j = 0; j < 4; j++) {
|
|
||||||
_ws2812b.setPixelColor(i + j, colors[pass]);
|
|
||||||
}
|
|
||||||
_ws2812b.show();
|
|
||||||
delay(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = NUM_PIXELS - 4; i >= 0; i--) {
|
|
||||||
_ws2812b.clear();
|
|
||||||
_ws2812b.show();
|
|
||||||
for (int j = 0; j < 4; j++) {
|
|
||||||
_ws2812b.setPixelColor(i + j, colors[pass]);
|
|
||||||
}
|
|
||||||
_ws2812b.show();
|
|
||||||
delay(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ws2812b.clear();
|
|
||||||
_ws2812b.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LedStrip::update(){
|
|
||||||
display_rpm(_rpm);
|
|
||||||
}
|
|
||||||
|
|
||||||
Binary file not shown.
|
|
@ -1,82 +0,0 @@
|
||||||
// #include "../include/led_strip.hpp"
|
|
||||||
|
|
||||||
// void LedStrip::display_warning(int warning){
|
|
||||||
// if(warning == STOP_CAR_WARNING){
|
|
||||||
// for(int i = 0; i < NUM_PIXELS; i++){
|
|
||||||
// _leds[i] = CRGB::Red;
|
|
||||||
// }
|
|
||||||
// FastLED.show();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void LedStrip::set_rpm(int rpm){
|
|
||||||
// if (xSemaphoreTake(_mutex, portMAX_DELAY) == pdTRUE) {
|
|
||||||
// display_rpm(rpm);
|
|
||||||
// xSemaphoreGive(_mutex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void LedStrip::display_rpm(int rpm){
|
|
||||||
// if (rpm > RPM_MAX) {
|
|
||||||
// for (int i = 0; i < NUM_PIXELS; i++) {
|
|
||||||
// _leds[i] = CRGB::Red;
|
|
||||||
// }
|
|
||||||
// FastLED.show();
|
|
||||||
// delay(50);
|
|
||||||
// for (int i = 0; i < NUM_PIXELS; i++) {
|
|
||||||
// _leds[i] = CRGB::Black;
|
|
||||||
// }
|
|
||||||
// FastLED.show();
|
|
||||||
// delay(50);
|
|
||||||
// } else {
|
|
||||||
// int numLeds = map(rpm, RPM_MIN, RPM_MAX, 0, NUM_PIXELS);
|
|
||||||
|
|
||||||
// for (int i = 0; i < NUM_PIXELS; i++) {
|
|
||||||
// if (i < numLeds) {
|
|
||||||
// if (i < NUM_PIXELS / 3) {
|
|
||||||
// _leds[i] = CRGB::Green;
|
|
||||||
// } else if (i < 2 * NUM_PIXELS / 3) {
|
|
||||||
// _leds[i] = CRGB::Yellow;
|
|
||||||
// } else {
|
|
||||||
// _leds[i] = CRGB::Red;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// _leds[i] = CRGB::Black;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// FastLED.show();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void LedStrip::display_startup(){
|
|
||||||
// FastLED.setBrightness(255);
|
|
||||||
// CRGB colors[3] = { CRGB::Red, CRGB::Green, CRGB::Blue };
|
|
||||||
|
|
||||||
// for (int pass = 0; pass < 3; pass++) {
|
|
||||||
// for (int i = 0; i <= NUM_PIXELS - 4; i++) {
|
|
||||||
// fill_solid(_leds, NUM_PIXELS, CRGB::Black);
|
|
||||||
// FastLED.show();
|
|
||||||
// for (int j = 0; j < 4; j++) {
|
|
||||||
// _leds[i + j] = colors[pass];
|
|
||||||
// }
|
|
||||||
// FastLED.show();
|
|
||||||
// delay(10);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// for (int i = NUM_PIXELS - 4; i >= 0; i--) {
|
|
||||||
// fill_solid(_leds, NUM_PIXELS, CRGB::Black);
|
|
||||||
// FastLED.show();
|
|
||||||
// for (int j = 0; j < 4; j++) {
|
|
||||||
// _leds[i + j] = colors[pass];
|
|
||||||
// }
|
|
||||||
// FastLED.show();
|
|
||||||
// delay(10);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// fill_solid(_leds, NUM_PIXELS, CRGB::Black);
|
|
||||||
// FastLED.show();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void LedStrip::update(){
|
|
||||||
// display_rpm(_rpm);
|
|
||||||
// }
|
|
||||||
Binary file not shown.
50
src/ui/ui.c
50
src/ui/ui.c
|
|
@ -1,50 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#include "../../include/ui/ui.h"
|
|
||||||
#include "../../include/ui/ui_helpers.h"
|
|
||||||
|
|
||||||
///////////////////// VARIABLES ////////////////////
|
|
||||||
|
|
||||||
// EVENTS
|
|
||||||
lv_obj_t * ui____initial_actions0;
|
|
||||||
|
|
||||||
// IMAGES AND IMAGE SETS
|
|
||||||
|
|
||||||
///////////////////// TEST LVGL SETTINGS ////////////////////
|
|
||||||
#if LV_COLOR_DEPTH != 16
|
|
||||||
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
|
||||||
#endif
|
|
||||||
#if LV_COLOR_16_SWAP !=0
|
|
||||||
#error "LV_COLOR_16_SWAP should be 0 to match SquareLine Studio's settings"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
///////////////////// ANIMATIONS ////////////////////
|
|
||||||
|
|
||||||
///////////////////// FUNCTIONS ////////////////////
|
|
||||||
|
|
||||||
///////////////////// SCREENS ////////////////////
|
|
||||||
|
|
||||||
void ui_init(void)
|
|
||||||
{
|
|
||||||
lv_disp_t * dispp = lv_disp_get_default();
|
|
||||||
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
|
|
||||||
true, LV_FONT_DEFAULT);
|
|
||||||
lv_disp_set_theme(dispp, theme);
|
|
||||||
ui_Screen1_screen_init();
|
|
||||||
ui_Screen2_screen_init();
|
|
||||||
ui_Screen3_screen_init();
|
|
||||||
ui_Screen4_screen_init();
|
|
||||||
ui____initial_actions0 = lv_obj_create(NULL);
|
|
||||||
lv_disp_load_scr(ui_Screen1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ui_destroy(void)
|
|
||||||
{
|
|
||||||
ui_Screen1_screen_destroy();
|
|
||||||
ui_Screen2_screen_destroy();
|
|
||||||
ui_Screen3_screen_destroy();
|
|
||||||
ui_Screen4_screen_destroy();
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
|
@ -1,378 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#include "../../include/ui/ui.h"
|
|
||||||
|
|
||||||
lv_obj_t * ui_Screen1 = NULL;
|
|
||||||
lv_obj_t * ui_PanelGear = NULL;
|
|
||||||
lv_obj_t * ui_gear = NULL;
|
|
||||||
lv_obj_t * ui_PanelRPM = NULL;
|
|
||||||
lv_obj_t * ui_rpm = NULL;
|
|
||||||
lv_obj_t * ui_PanelBATT = NULL;
|
|
||||||
lv_obj_t * ui_battvoltlabel = NULL;
|
|
||||||
lv_obj_t * ui_battvolt = NULL;
|
|
||||||
lv_obj_t * ui_PanelETC = NULL;
|
|
||||||
lv_obj_t * ui_ect = NULL;
|
|
||||||
lv_obj_t * ui_ECTlabel = NULL;
|
|
||||||
lv_obj_t * ui_PanelSHUTDOWN = NULL;
|
|
||||||
lv_obj_t * ui_SHUTDOWN_LABEL = NULL;
|
|
||||||
lv_obj_t * ui_shutdown = NULL;
|
|
||||||
lv_obj_t * ui_PanelFAN = NULL;
|
|
||||||
lv_obj_t * ui_FANLabel = NULL;
|
|
||||||
lv_obj_t * ui_fan = NULL;
|
|
||||||
|
|
||||||
// RPM LED Bar - 16 mini panels
|
|
||||||
lv_obj_t * ui_RPMBar1 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar2 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar3 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar4 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar5 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar6 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar7 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar8 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar9 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar10 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar11 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar12 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar13 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar14 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar15 = NULL;
|
|
||||||
lv_obj_t * ui_RPMBar16 = NULL;
|
|
||||||
|
|
||||||
// event funtions
|
|
||||||
|
|
||||||
// build funtions
|
|
||||||
|
|
||||||
void ui_Screen1_screen_init(void)
|
|
||||||
{
|
|
||||||
ui_Screen1 = lv_obj_create(NULL);
|
|
||||||
lv_obj_clear_flag(ui_Screen1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
// Create 16 RPM LED Bar panels across the top (8000-12500 RPM range)
|
|
||||||
// Each panel is 50px wide (800/16), 40px high, positioned at top
|
|
||||||
|
|
||||||
ui_RPMBar1 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar1, 48); // 50px - 2px margin
|
|
||||||
lv_obj_set_height(ui_RPMBar1, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar1, -375); // Starting from left: -400 + 25
|
|
||||||
lv_obj_set_y(ui_RPMBar1, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar1, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar1, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar2 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar2, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar2, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar2, -325);
|
|
||||||
lv_obj_set_y(ui_RPMBar2, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar2, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar2, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar3 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar3, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar3, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar3, -275);
|
|
||||||
lv_obj_set_y(ui_RPMBar3, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar3, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar3, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar4 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar4, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar4, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar4, -225);
|
|
||||||
lv_obj_set_y(ui_RPMBar4, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar4, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar4, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar5 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar5, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar5, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar5, -175);
|
|
||||||
lv_obj_set_y(ui_RPMBar5, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar5, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar5, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar6 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar6, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar6, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar6, -125);
|
|
||||||
lv_obj_set_y(ui_RPMBar6, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar6, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar6, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar7 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar7, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar7, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar7, -75);
|
|
||||||
lv_obj_set_y(ui_RPMBar7, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar7, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar7, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar8 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar8, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar8, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar8, -25);
|
|
||||||
lv_obj_set_y(ui_RPMBar8, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar8, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar8, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar9 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar9, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar9, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar9, 25);
|
|
||||||
lv_obj_set_y(ui_RPMBar9, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar9, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar9, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar10 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar10, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar10, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar10, 75);
|
|
||||||
lv_obj_set_y(ui_RPMBar10, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar10, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar10, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar11 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar11, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar11, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar11, 125);
|
|
||||||
lv_obj_set_y(ui_RPMBar11, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar11, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar11, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar12 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar12, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar12, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar12, 175);
|
|
||||||
lv_obj_set_y(ui_RPMBar12, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar12, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar12, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar13 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar13, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar13, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar13, 225);
|
|
||||||
lv_obj_set_y(ui_RPMBar13, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar13, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar13, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar14 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar14, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar14, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar14, 275);
|
|
||||||
lv_obj_set_y(ui_RPMBar14, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar14, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar14, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar15 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar15, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar15, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar15, 325);
|
|
||||||
lv_obj_set_y(ui_RPMBar15, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar15, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar15, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_RPMBar16 = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_RPMBar16, 48);
|
|
||||||
lv_obj_set_height(ui_RPMBar16, 35);
|
|
||||||
lv_obj_set_x(ui_RPMBar16, 375);
|
|
||||||
lv_obj_set_y(ui_RPMBar16, -220);
|
|
||||||
lv_obj_set_align(ui_RPMBar16, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_RPMBar16, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
|
|
||||||
ui_PanelGear = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_PanelGear, 229);
|
|
||||||
lv_obj_set_height(ui_PanelGear, 290);
|
|
||||||
lv_obj_set_x(ui_PanelGear, 0);
|
|
||||||
lv_obj_set_y(ui_PanelGear, 91); // Moved down from 41
|
|
||||||
lv_obj_set_align(ui_PanelGear, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelGear, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_gear = lv_label_create(ui_PanelGear);
|
|
||||||
lv_obj_set_width(ui_gear, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_gear, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_gear, 2);
|
|
||||||
lv_obj_set_y(ui_gear, 6);
|
|
||||||
lv_obj_set_align(ui_gear, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_long_mode(ui_gear, LV_LABEL_LONG_DOT);
|
|
||||||
lv_label_set_text(ui_gear, "N");
|
|
||||||
lv_obj_set_style_text_color(ui_gear, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_gear, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_decor(ui_gear, LV_TEXT_DECOR_NONE, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_gear, &ui_font_Consolas350, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelRPM = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_PanelRPM, 778);
|
|
||||||
lv_obj_set_height(ui_PanelRPM, 126);
|
|
||||||
lv_obj_set_x(ui_PanelRPM, 0);
|
|
||||||
lv_obj_set_y(ui_PanelRPM, -133); // Moved down from -173
|
|
||||||
lv_obj_set_align(ui_PanelRPM, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelRPM, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_rpm = lv_label_create(ui_PanelRPM);
|
|
||||||
lv_obj_set_width(ui_rpm, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_rpm, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_rpm, -2);
|
|
||||||
lv_obj_set_y(ui_rpm, 3);
|
|
||||||
lv_obj_set_align(ui_rpm, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_rpm, "12800");
|
|
||||||
lv_obj_set_style_text_letter_space(ui_rpm, 4, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_line_space(ui_rpm, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_rpm, &ui_font_Consolas150, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelBATT = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_PanelBATT, 258);
|
|
||||||
lv_obj_set_height(ui_PanelBATT, 130);
|
|
||||||
lv_obj_set_x(ui_PanelBATT, -255);
|
|
||||||
lv_obj_set_y(ui_PanelBATT, 13); // Moved down from -37
|
|
||||||
lv_obj_set_align(ui_PanelBATT, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelBATT, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_battvoltlabel = lv_label_create(ui_PanelBATT);
|
|
||||||
lv_obj_set_width(ui_battvoltlabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_battvoltlabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_battvoltlabel, -88);
|
|
||||||
lv_obj_set_y(ui_battvoltlabel, 1);
|
|
||||||
lv_obj_set_align(ui_battvoltlabel, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_battvoltlabel, "VBATT");
|
|
||||||
lv_obj_set_style_text_color(ui_battvoltlabel, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_battvoltlabel, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_battvoltlabel, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_battvolt = lv_label_create(ui_PanelBATT);
|
|
||||||
lv_obj_set_width(ui_battvolt, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_battvolt, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_battvolt, 34);
|
|
||||||
lv_obj_set_y(ui_battvolt, 2);
|
|
||||||
lv_obj_set_align(ui_battvolt, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_battvolt, "13.64");
|
|
||||||
lv_obj_set_style_text_font(ui_battvolt, &ui_font_Consolas60, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelETC = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_PanelETC, 258);
|
|
||||||
lv_obj_set_height(ui_PanelETC, 128);
|
|
||||||
lv_obj_set_x(ui_PanelETC, 254);
|
|
||||||
lv_obj_set_y(ui_PanelETC, 12); // Moved down from -38
|
|
||||||
lv_obj_set_align(ui_PanelETC, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelETC, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_ect = lv_label_create(ui_PanelETC);
|
|
||||||
lv_obj_set_width(ui_ect, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_ect, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_ect, 58);
|
|
||||||
lv_obj_set_y(ui_ect, 3);
|
|
||||||
lv_obj_set_align(ui_ect, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_ect, "80");
|
|
||||||
lv_obj_set_style_text_font(ui_ect, &ui_font_Consolas60, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_ECTlabel = lv_label_create(ui_PanelETC);
|
|
||||||
lv_obj_set_width(ui_ECTlabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_ECTlabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_ECTlabel, -94);
|
|
||||||
lv_obj_set_y(ui_ECTlabel, 1);
|
|
||||||
lv_obj_set_align(ui_ECTlabel, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_ECTlabel, "ECT");
|
|
||||||
lv_obj_set_style_text_color(ui_ECTlabel, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_ECTlabel, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_ECTlabel, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelSHUTDOWN = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_PanelSHUTDOWN, 259);
|
|
||||||
lv_obj_set_height(ui_PanelSHUTDOWN, 52);
|
|
||||||
lv_obj_set_x(ui_PanelSHUTDOWN, -256);
|
|
||||||
lv_obj_set_y(ui_PanelSHUTDOWN, 113); // Moved down from 63
|
|
||||||
lv_obj_set_align(ui_PanelSHUTDOWN, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelSHUTDOWN, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_SHUTDOWN_LABEL = lv_label_create(ui_PanelSHUTDOWN);
|
|
||||||
lv_obj_set_width(ui_SHUTDOWN_LABEL, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_SHUTDOWN_LABEL, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_SHUTDOWN_LABEL, -67);
|
|
||||||
lv_obj_set_y(ui_SHUTDOWN_LABEL, -1);
|
|
||||||
lv_obj_set_align(ui_SHUTDOWN_LABEL, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_SHUTDOWN_LABEL, "SHUTDOWN");
|
|
||||||
lv_obj_set_style_text_color(ui_SHUTDOWN_LABEL, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_SHUTDOWN_LABEL, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_SHUTDOWN_LABEL, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_shutdown = lv_label_create(ui_PanelSHUTDOWN);
|
|
||||||
lv_obj_set_width(ui_shutdown, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_shutdown, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_shutdown, 72);
|
|
||||||
lv_obj_set_y(ui_shutdown, 0);
|
|
||||||
lv_obj_set_align(ui_shutdown, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_shutdown, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_shutdown, &ui_font_Consolas35, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelFAN = lv_obj_create(ui_Screen1);
|
|
||||||
lv_obj_set_width(ui_PanelFAN, 255);
|
|
||||||
lv_obj_set_height(ui_PanelFAN, 52);
|
|
||||||
lv_obj_set_x(ui_PanelFAN, 254);
|
|
||||||
lv_obj_set_y(ui_PanelFAN, 111); // Moved down from 61
|
|
||||||
lv_obj_set_align(ui_PanelFAN, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelFAN, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_FANLabel = lv_label_create(ui_PanelFAN);
|
|
||||||
lv_obj_set_width(ui_FANLabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_FANLabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_FANLabel, -91);
|
|
||||||
lv_obj_set_y(ui_FANLabel, 9);
|
|
||||||
lv_obj_set_align(ui_FANLabel, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_FANLabel, "FAN\n");
|
|
||||||
lv_obj_set_style_text_color(ui_FANLabel, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_FANLabel, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_FANLabel, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_fan = lv_label_create(ui_PanelFAN);
|
|
||||||
lv_obj_set_width(ui_fan, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_fan, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_fan, 58);
|
|
||||||
lv_obj_set_y(ui_fan, -1);
|
|
||||||
lv_obj_set_align(ui_fan, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_fan, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_fan, &ui_font_Consolas35, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void ui_Screen1_screen_destroy(void)
|
|
||||||
{
|
|
||||||
if(ui_Screen1) lv_obj_del(ui_Screen1);
|
|
||||||
|
|
||||||
// NULL screen variables
|
|
||||||
ui_Screen1 = NULL;
|
|
||||||
ui_PanelGear = NULL;
|
|
||||||
ui_gear = NULL;
|
|
||||||
ui_PanelRPM = NULL;
|
|
||||||
ui_rpm = NULL;
|
|
||||||
ui_PanelBATT = NULL;
|
|
||||||
ui_battvoltlabel = NULL;
|
|
||||||
ui_battvolt = NULL;
|
|
||||||
ui_PanelETC = NULL;
|
|
||||||
ui_ect = NULL;
|
|
||||||
ui_ECTlabel = NULL;
|
|
||||||
ui_PanelSHUTDOWN = NULL;
|
|
||||||
ui_SHUTDOWN_LABEL = NULL;
|
|
||||||
ui_shutdown = NULL;
|
|
||||||
ui_PanelFAN = NULL;
|
|
||||||
ui_FANLabel = NULL;
|
|
||||||
ui_fan = NULL;
|
|
||||||
|
|
||||||
// RPM Bar panels
|
|
||||||
ui_RPMBar1 = NULL;
|
|
||||||
ui_RPMBar2 = NULL;
|
|
||||||
ui_RPMBar3 = NULL;
|
|
||||||
ui_RPMBar4 = NULL;
|
|
||||||
ui_RPMBar5 = NULL;
|
|
||||||
ui_RPMBar6 = NULL;
|
|
||||||
ui_RPMBar7 = NULL;
|
|
||||||
ui_RPMBar8 = NULL;
|
|
||||||
ui_RPMBar9 = NULL;
|
|
||||||
ui_RPMBar10 = NULL;
|
|
||||||
ui_RPMBar11 = NULL;
|
|
||||||
ui_RPMBar12 = NULL;
|
|
||||||
ui_RPMBar13 = NULL;
|
|
||||||
ui_RPMBar14 = NULL;
|
|
||||||
ui_RPMBar15 = NULL;
|
|
||||||
ui_RPMBar16 = NULL;
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
|
@ -1,220 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#include "../../include/ui/ui.h"
|
|
||||||
|
|
||||||
lv_obj_t * ui_Screen2 = NULL;
|
|
||||||
lv_obj_t * ui_fueltitlepanel = NULL;
|
|
||||||
lv_obj_t * ui_fuellabeltitle = NULL;
|
|
||||||
lv_obj_t * ui_PanelLambda = NULL;
|
|
||||||
lv_obj_t * ui_lambda = NULL;
|
|
||||||
lv_obj_t * ui_LambdaLabel = NULL;
|
|
||||||
lv_obj_t * ui_PanelLambdatarget = NULL;
|
|
||||||
lv_obj_t * ui_lambdatarget = NULL;
|
|
||||||
lv_obj_t * ui_LambdaLabel1 = NULL;
|
|
||||||
lv_obj_t * ui_Panelfuel = NULL;
|
|
||||||
lv_obj_t * ui_FUELLabel = NULL;
|
|
||||||
lv_obj_t * ui_fuel = NULL;
|
|
||||||
lv_obj_t * ui_PaneLCorrlamb = NULL;
|
|
||||||
lv_obj_t * ui_CORRLAMBDALabel1 = NULL;
|
|
||||||
lv_obj_t * ui_correctionlambda = NULL;
|
|
||||||
lv_obj_t * ui_PanelETC2 = NULL;
|
|
||||||
lv_obj_t * ui_ect2 = NULL;
|
|
||||||
lv_obj_t * ui_ECTlabel2 = NULL;
|
|
||||||
// event funtions
|
|
||||||
|
|
||||||
// build funtions
|
|
||||||
|
|
||||||
void ui_Screen2_screen_init(void)
|
|
||||||
{
|
|
||||||
ui_Screen2 = lv_obj_create(NULL);
|
|
||||||
lv_obj_clear_flag(ui_Screen2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_fueltitlepanel = lv_obj_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_fueltitlepanel, 770);
|
|
||||||
lv_obj_set_height(ui_fueltitlepanel, 63);
|
|
||||||
lv_obj_set_x(ui_fueltitlepanel, -2);
|
|
||||||
lv_obj_set_y(ui_fueltitlepanel, -202);
|
|
||||||
lv_obj_set_align(ui_fueltitlepanel, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_fueltitlepanel, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_fuellabeltitle = lv_label_create(ui_fueltitlepanel);
|
|
||||||
lv_obj_set_width(ui_fuellabeltitle, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_fuellabeltitle, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_fuellabeltitle, 9);
|
|
||||||
lv_obj_set_y(ui_fuellabeltitle, 0);
|
|
||||||
lv_obj_set_align(ui_fuellabeltitle, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_fuellabeltitle, "WARM UP");
|
|
||||||
lv_obj_set_style_text_letter_space(ui_fuellabeltitle, 4, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_line_space(ui_fuellabeltitle, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_fuellabeltitle, &ui_font_Consolas60, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelLambda = lv_obj_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_PanelLambda, 379);
|
|
||||||
lv_obj_set_height(ui_PanelLambda, 128);
|
|
||||||
lv_obj_set_x(ui_PanelLambda, -195);
|
|
||||||
lv_obj_set_y(ui_PanelLambda, -95);
|
|
||||||
lv_obj_set_align(ui_PanelLambda, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelLambda, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_lambda = lv_label_create(ui_PanelLambda);
|
|
||||||
lv_obj_set_width(ui_lambda, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_lambda, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_lambda, 55);
|
|
||||||
lv_obj_set_y(ui_lambda, 0);
|
|
||||||
lv_obj_set_align(ui_lambda, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_lambda, "0.923");
|
|
||||||
lv_obj_set_style_text_font(ui_lambda, &ui_font_Consolas60, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_LambdaLabel = lv_label_create(ui_PanelLambda);
|
|
||||||
lv_obj_set_width(ui_LambdaLabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_LambdaLabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_LambdaLabel, -120);
|
|
||||||
lv_obj_set_y(ui_LambdaLabel, -2);
|
|
||||||
lv_obj_set_align(ui_LambdaLabel, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_LambdaLabel, "LAMBDA");
|
|
||||||
lv_obj_set_style_text_color(ui_LambdaLabel, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_LambdaLabel, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_LambdaLabel, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelLambdatarget = lv_obj_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_PanelLambdatarget, 373);
|
|
||||||
lv_obj_set_height(ui_PanelLambdatarget, 128);
|
|
||||||
lv_obj_set_x(ui_PanelLambdatarget, 197);
|
|
||||||
lv_obj_set_y(ui_PanelLambdatarget, -94);
|
|
||||||
lv_obj_set_align(ui_PanelLambdatarget, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelLambdatarget, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_lambdatarget = lv_label_create(ui_PanelLambdatarget);
|
|
||||||
lv_obj_set_width(ui_lambdatarget, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_lambdatarget, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_lambdatarget, 71);
|
|
||||||
lv_obj_set_y(ui_lambdatarget, -1);
|
|
||||||
lv_obj_set_align(ui_lambdatarget, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_lambdatarget, "1.042");
|
|
||||||
lv_obj_set_style_text_font(ui_lambdatarget, &ui_font_Consolas60, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_LambdaLabel1 = lv_label_create(ui_PanelLambdatarget);
|
|
||||||
lv_obj_set_width(ui_LambdaLabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_LambdaLabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_LambdaLabel1, -109);
|
|
||||||
lv_obj_set_y(ui_LambdaLabel1, -1);
|
|
||||||
lv_obj_set_align(ui_LambdaLabel1, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_LambdaLabel1, "LAMBDA TG");
|
|
||||||
lv_obj_set_style_text_color(ui_LambdaLabel1, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_LambdaLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_LambdaLabel1, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_Panelfuel = lv_obj_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_Panelfuel, 373);
|
|
||||||
lv_obj_set_height(ui_Panelfuel, 52);
|
|
||||||
lv_obj_set_x(ui_Panelfuel, 198);
|
|
||||||
lv_obj_set_y(ui_Panelfuel, 72);
|
|
||||||
lv_obj_set_align(ui_Panelfuel, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_Panelfuel, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_FUELLabel = lv_label_create(ui_Panelfuel);
|
|
||||||
lv_obj_set_width(ui_FUELLabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_FUELLabel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_FUELLabel, -127);
|
|
||||||
lv_obj_set_y(ui_FUELLabel, 1);
|
|
||||||
lv_obj_set_align(ui_FUELLabel, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_FUELLabel, "FUEL %");
|
|
||||||
lv_obj_set_style_text_color(ui_FUELLabel, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_FUELLabel, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_FUELLabel, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_fuel = lv_label_create(ui_Panelfuel);
|
|
||||||
lv_obj_set_width(ui_fuel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_fuel, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_fuel, 119);
|
|
||||||
lv_obj_set_y(ui_fuel, -1);
|
|
||||||
lv_obj_set_align(ui_fuel, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_fuel, "28.4");
|
|
||||||
lv_obj_set_style_text_font(ui_fuel, &ui_font_Consolas35, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PaneLCorrlamb = lv_obj_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_PaneLCorrlamb, 374);
|
|
||||||
lv_obj_set_height(ui_PaneLCorrlamb, 52);
|
|
||||||
lv_obj_set_x(ui_PaneLCorrlamb, 198);
|
|
||||||
lv_obj_set_y(ui_PaneLCorrlamb, 7);
|
|
||||||
lv_obj_set_align(ui_PaneLCorrlamb, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PaneLCorrlamb, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_CORRLAMBDALabel1 = lv_label_create(ui_PaneLCorrlamb);
|
|
||||||
lv_obj_set_width(ui_CORRLAMBDALabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_CORRLAMBDALabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_CORRLAMBDALabel1, -94);
|
|
||||||
lv_obj_set_y(ui_CORRLAMBDALabel1, 0);
|
|
||||||
lv_obj_set_align(ui_CORRLAMBDALabel1, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_CORRLAMBDALabel1, "LAMBDA CORR %");
|
|
||||||
lv_obj_set_style_text_color(ui_CORRLAMBDALabel1, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_CORRLAMBDALabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_CORRLAMBDALabel1, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_correctionlambda = lv_label_create(ui_PaneLCorrlamb);
|
|
||||||
lv_obj_set_width(ui_correctionlambda, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_correctionlambda, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_correctionlambda, 119);
|
|
||||||
lv_obj_set_y(ui_correctionlambda, -1);
|
|
||||||
lv_obj_set_align(ui_correctionlambda, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_correctionlambda, "4.75");
|
|
||||||
lv_obj_set_style_text_font(ui_correctionlambda, &ui_font_Consolas35, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelETC2 = lv_obj_create(ui_Screen2);
|
|
||||||
lv_obj_set_width(ui_PanelETC2, 377);
|
|
||||||
lv_obj_set_height(ui_PanelETC2, 128);
|
|
||||||
lv_obj_set_x(ui_PanelETC2, -195);
|
|
||||||
lv_obj_set_y(ui_PanelETC2, 42);
|
|
||||||
lv_obj_set_align(ui_PanelETC2, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelETC2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_ect2 = lv_label_create(ui_PanelETC2);
|
|
||||||
lv_obj_set_width(ui_ect2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_ect2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_ect2, 100);
|
|
||||||
lv_obj_set_y(ui_ect2, -2);
|
|
||||||
lv_obj_set_align(ui_ect2, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_ect2, "80");
|
|
||||||
lv_obj_set_style_text_font(ui_ect2, &lv_font_montserrat_48, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_ECTlabel2 = lv_label_create(ui_PanelETC2);
|
|
||||||
lv_obj_set_width(ui_ECTlabel2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_ECTlabel2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_ECTlabel2, -142);
|
|
||||||
lv_obj_set_y(ui_ECTlabel2, 0);
|
|
||||||
lv_obj_set_align(ui_ECTlabel2, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_ECTlabel2, "ECT");
|
|
||||||
lv_obj_set_style_text_color(ui_ECTlabel2, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_ECTlabel2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_ECTlabel2, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void ui_Screen2_screen_destroy(void)
|
|
||||||
{
|
|
||||||
if(ui_Screen2) lv_obj_del(ui_Screen2);
|
|
||||||
|
|
||||||
// NULL screen variables
|
|
||||||
ui_Screen2 = NULL;
|
|
||||||
ui_fueltitlepanel = NULL;
|
|
||||||
ui_fuellabeltitle = NULL;
|
|
||||||
ui_PanelLambda = NULL;
|
|
||||||
ui_lambda = NULL;
|
|
||||||
ui_LambdaLabel = NULL;
|
|
||||||
ui_PanelLambdatarget = NULL;
|
|
||||||
ui_lambdatarget = NULL;
|
|
||||||
ui_LambdaLabel1 = NULL;
|
|
||||||
ui_Panelfuel = NULL;
|
|
||||||
ui_FUELLabel = NULL;
|
|
||||||
ui_fuel = NULL;
|
|
||||||
ui_PaneLCorrlamb = NULL;
|
|
||||||
ui_CORRLAMBDALabel1 = NULL;
|
|
||||||
ui_correctionlambda = NULL;
|
|
||||||
ui_PanelETC2 = NULL;
|
|
||||||
ui_ect2 = NULL;
|
|
||||||
ui_ECTlabel2 = NULL;
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
|
@ -1,390 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#include "../../include/ui/ui.h"
|
|
||||||
|
|
||||||
lv_obj_t * ui_Screen3 = NULL;
|
|
||||||
lv_obj_t * ui_fueltitlepanel2 = NULL;
|
|
||||||
lv_obj_t * ui_fuellabeltitle2 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX1 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel1 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus1 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX2 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel2 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus2 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX3 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel3 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus3 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX4 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel4 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus4 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX5 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel5 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus5 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX6 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel6 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus6 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX7 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel7 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus7 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX8 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel8 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus8 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX9 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel9 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus9 = NULL;
|
|
||||||
lv_obj_t * ui_PanelAUX10 = NULL;
|
|
||||||
lv_obj_t * ui_AUXLabel10 = NULL;
|
|
||||||
lv_obj_t * ui_auxstatus10 = NULL;
|
|
||||||
// event funtions
|
|
||||||
|
|
||||||
// build funtions
|
|
||||||
|
|
||||||
void ui_Screen3_screen_init(void)
|
|
||||||
{
|
|
||||||
ui_Screen3 = lv_obj_create(NULL);
|
|
||||||
lv_obj_clear_flag(ui_Screen3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_fueltitlepanel2 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_fueltitlepanel2, 770);
|
|
||||||
lv_obj_set_height(ui_fueltitlepanel2, 63);
|
|
||||||
lv_obj_set_x(ui_fueltitlepanel2, -2);
|
|
||||||
lv_obj_set_y(ui_fueltitlepanel2, -202);
|
|
||||||
lv_obj_set_align(ui_fueltitlepanel2, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_fueltitlepanel2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_fuellabeltitle2 = lv_label_create(ui_fueltitlepanel2);
|
|
||||||
lv_obj_set_width(ui_fuellabeltitle2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_fuellabeltitle2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_fuellabeltitle2, 2);
|
|
||||||
lv_obj_set_y(ui_fuellabeltitle2, 1);
|
|
||||||
lv_obj_set_align(ui_fuellabeltitle2, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_fuellabeltitle2, "AUX");
|
|
||||||
lv_obj_set_style_text_letter_space(ui_fuellabeltitle2, 4, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_line_space(ui_fuellabeltitle2, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_fuellabeltitle2, &lv_font_montserrat_48, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX1 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX1, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX1, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX1, -197);
|
|
||||||
lv_obj_set_y(ui_PanelAUX1, -133);
|
|
||||||
lv_obj_set_align(ui_PanelAUX1, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel1 = lv_label_create(ui_PanelAUX1);
|
|
||||||
lv_obj_set_width(ui_AUXLabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel1, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel1, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel1, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel1, "AUX 1 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel1, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel1, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus1 = lv_label_create(ui_PanelAUX1);
|
|
||||||
lv_obj_set_width(ui_auxstatus1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus1, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus1, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus1, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus1, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus1, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX2 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX2, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX2, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX2, -196);
|
|
||||||
lv_obj_set_y(ui_PanelAUX2, -70);
|
|
||||||
lv_obj_set_align(ui_PanelAUX2, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel2 = lv_label_create(ui_PanelAUX2);
|
|
||||||
lv_obj_set_width(ui_AUXLabel2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel2, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel2, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel2, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel2, "AUX 2 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel2, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel2, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus2 = lv_label_create(ui_PanelAUX2);
|
|
||||||
lv_obj_set_width(ui_auxstatus2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus2, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus2, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus2, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus2, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus2, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX3 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX3, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX3, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX3, -196);
|
|
||||||
lv_obj_set_y(ui_PanelAUX3, -6);
|
|
||||||
lv_obj_set_align(ui_PanelAUX3, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel3 = lv_label_create(ui_PanelAUX3);
|
|
||||||
lv_obj_set_width(ui_AUXLabel3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel3, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel3, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel3, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel3, "AUX 3 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel3, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel3, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus3 = lv_label_create(ui_PanelAUX3);
|
|
||||||
lv_obj_set_width(ui_auxstatus3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus3, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus3, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus3, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus3, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus3, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX4 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX4, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX4, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX4, -195);
|
|
||||||
lv_obj_set_y(ui_PanelAUX4, 57);
|
|
||||||
lv_obj_set_align(ui_PanelAUX4, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX4, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel4 = lv_label_create(ui_PanelAUX4);
|
|
||||||
lv_obj_set_width(ui_AUXLabel4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel4, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel4, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel4, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel4, "AUX 4 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel4, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel4, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus4 = lv_label_create(ui_PanelAUX4);
|
|
||||||
lv_obj_set_width(ui_auxstatus4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus4, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus4, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus4, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus4, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus4, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX5 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX5, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX5, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX5, -195);
|
|
||||||
lv_obj_set_y(ui_PanelAUX5, 120);
|
|
||||||
lv_obj_set_align(ui_PanelAUX5, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX5, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel5 = lv_label_create(ui_PanelAUX5);
|
|
||||||
lv_obj_set_width(ui_AUXLabel5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel5, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel5, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel5, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel5, "AUX 5 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel5, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel5, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus5 = lv_label_create(ui_PanelAUX5);
|
|
||||||
lv_obj_set_width(ui_auxstatus5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus5, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus5, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus5, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus5, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus5, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX6 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX6, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX6, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX6, 193);
|
|
||||||
lv_obj_set_y(ui_PanelAUX6, -133);
|
|
||||||
lv_obj_set_align(ui_PanelAUX6, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX6, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel6 = lv_label_create(ui_PanelAUX6);
|
|
||||||
lv_obj_set_width(ui_AUXLabel6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel6, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel6, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel6, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel6, "AUX 6 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel6, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel6, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus6 = lv_label_create(ui_PanelAUX6);
|
|
||||||
lv_obj_set_width(ui_auxstatus6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus6, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus6, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus6, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus6, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus6, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX7 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX7, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX7, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX7, 194);
|
|
||||||
lv_obj_set_y(ui_PanelAUX7, -70);
|
|
||||||
lv_obj_set_align(ui_PanelAUX7, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX7, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel7 = lv_label_create(ui_PanelAUX7);
|
|
||||||
lv_obj_set_width(ui_AUXLabel7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel7, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel7, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel7, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel7, "AUX 7 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel7, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel7, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel7, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus7 = lv_label_create(ui_PanelAUX7);
|
|
||||||
lv_obj_set_width(ui_auxstatus7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus7, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus7, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus7, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus7, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus7, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX8 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX8, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX8, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX8, 193);
|
|
||||||
lv_obj_set_y(ui_PanelAUX8, -6);
|
|
||||||
lv_obj_set_align(ui_PanelAUX8, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX8, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel8 = lv_label_create(ui_PanelAUX8);
|
|
||||||
lv_obj_set_width(ui_AUXLabel8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel8, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel8, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel8, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel8, "AUX 8 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel8, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel8, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel8, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus8 = lv_label_create(ui_PanelAUX8);
|
|
||||||
lv_obj_set_width(ui_auxstatus8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus8, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus8, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus8, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus8, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus8, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX9 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX9, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX9, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX9, 194);
|
|
||||||
lv_obj_set_y(ui_PanelAUX9, 57);
|
|
||||||
lv_obj_set_align(ui_PanelAUX9, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX9, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel9 = lv_label_create(ui_PanelAUX9);
|
|
||||||
lv_obj_set_width(ui_AUXLabel9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel9, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel9, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel9, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel9, "AUX 9 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel9, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel9, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel9, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus9 = lv_label_create(ui_PanelAUX9);
|
|
||||||
lv_obj_set_width(ui_auxstatus9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus9, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus9, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus9, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus9, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus9, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelAUX10 = lv_obj_create(ui_Screen3);
|
|
||||||
lv_obj_set_width(ui_PanelAUX10, 378);
|
|
||||||
lv_obj_set_height(ui_PanelAUX10, 52);
|
|
||||||
lv_obj_set_x(ui_PanelAUX10, 193);
|
|
||||||
lv_obj_set_y(ui_PanelAUX10, 120);
|
|
||||||
lv_obj_set_align(ui_PanelAUX10, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelAUX10, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_AUXLabel10 = lv_label_create(ui_PanelAUX10);
|
|
||||||
lv_obj_set_width(ui_AUXLabel10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_AUXLabel10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_AUXLabel10, -108);
|
|
||||||
lv_obj_set_y(ui_AUXLabel10, 1);
|
|
||||||
lv_obj_set_align(ui_AUXLabel10, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_AUXLabel10, "AUX 10 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_AUXLabel10, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_AUXLabel10, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_AUXLabel10, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_auxstatus10 = lv_label_create(ui_PanelAUX10);
|
|
||||||
lv_obj_set_width(ui_auxstatus10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_auxstatus10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_auxstatus10, 117);
|
|
||||||
lv_obj_set_y(ui_auxstatus10, 0);
|
|
||||||
lv_obj_set_align(ui_auxstatus10, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_auxstatus10, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_auxstatus10, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void ui_Screen3_screen_destroy(void)
|
|
||||||
{
|
|
||||||
if(ui_Screen3) lv_obj_del(ui_Screen3);
|
|
||||||
|
|
||||||
// NULL screen variables
|
|
||||||
ui_Screen3 = NULL;
|
|
||||||
ui_fueltitlepanel2 = NULL;
|
|
||||||
ui_fuellabeltitle2 = NULL;
|
|
||||||
ui_PanelAUX1 = NULL;
|
|
||||||
ui_AUXLabel1 = NULL;
|
|
||||||
ui_auxstatus1 = NULL;
|
|
||||||
ui_PanelAUX2 = NULL;
|
|
||||||
ui_AUXLabel2 = NULL;
|
|
||||||
ui_auxstatus2 = NULL;
|
|
||||||
ui_PanelAUX3 = NULL;
|
|
||||||
ui_AUXLabel3 = NULL;
|
|
||||||
ui_auxstatus3 = NULL;
|
|
||||||
ui_PanelAUX4 = NULL;
|
|
||||||
ui_AUXLabel4 = NULL;
|
|
||||||
ui_auxstatus4 = NULL;
|
|
||||||
ui_PanelAUX5 = NULL;
|
|
||||||
ui_AUXLabel5 = NULL;
|
|
||||||
ui_auxstatus5 = NULL;
|
|
||||||
ui_PanelAUX6 = NULL;
|
|
||||||
ui_AUXLabel6 = NULL;
|
|
||||||
ui_auxstatus6 = NULL;
|
|
||||||
ui_PanelAUX7 = NULL;
|
|
||||||
ui_AUXLabel7 = NULL;
|
|
||||||
ui_auxstatus7 = NULL;
|
|
||||||
ui_PanelAUX8 = NULL;
|
|
||||||
ui_AUXLabel8 = NULL;
|
|
||||||
ui_auxstatus8 = NULL;
|
|
||||||
ui_PanelAUX9 = NULL;
|
|
||||||
ui_AUXLabel9 = NULL;
|
|
||||||
ui_auxstatus9 = NULL;
|
|
||||||
ui_PanelAUX10 = NULL;
|
|
||||||
ui_AUXLabel10 = NULL;
|
|
||||||
ui_auxstatus10 = NULL;
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
|
@ -1,390 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#include "../../include/ui/ui.h"
|
|
||||||
|
|
||||||
lv_obj_t * ui_Screen4 = NULL;
|
|
||||||
lv_obj_t * ui_fueltitlepanel3 = NULL;
|
|
||||||
lv_obj_t * ui_fuellabeltitle3 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL1 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel1 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus1 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL2 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel2 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus2 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL3 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel3 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus3 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL4 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel4 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus4 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL5 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel5 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus5 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL6 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel6 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus6 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL7 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel7 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus7 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL8 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel8 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus8 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL9 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel9 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus9 = NULL;
|
|
||||||
lv_obj_t * ui_PanelDIGITAL10 = NULL;
|
|
||||||
lv_obj_t * ui_DIGITALLabel10 = NULL;
|
|
||||||
lv_obj_t * ui_digitalstatus10 = NULL;
|
|
||||||
// event funtions
|
|
||||||
|
|
||||||
// build funtions
|
|
||||||
|
|
||||||
void ui_Screen4_screen_init(void)
|
|
||||||
{
|
|
||||||
ui_Screen4 = lv_obj_create(NULL);
|
|
||||||
lv_obj_clear_flag(ui_Screen4, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_fueltitlepanel3 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_fueltitlepanel3, 770);
|
|
||||||
lv_obj_set_height(ui_fueltitlepanel3, 63);
|
|
||||||
lv_obj_set_x(ui_fueltitlepanel3, -2);
|
|
||||||
lv_obj_set_y(ui_fueltitlepanel3, -202);
|
|
||||||
lv_obj_set_align(ui_fueltitlepanel3, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_fueltitlepanel3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_fuellabeltitle3 = lv_label_create(ui_fueltitlepanel3);
|
|
||||||
lv_obj_set_width(ui_fuellabeltitle3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_fuellabeltitle3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_fuellabeltitle3, 2);
|
|
||||||
lv_obj_set_y(ui_fuellabeltitle3, 1);
|
|
||||||
lv_obj_set_align(ui_fuellabeltitle3, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_fuellabeltitle3, "DIGITAL");
|
|
||||||
lv_obj_set_style_text_letter_space(ui_fuellabeltitle3, 4, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_line_space(ui_fuellabeltitle3, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_fuellabeltitle3, &lv_font_montserrat_48, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL1 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL1, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL1, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL1, -197);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL1, -133);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL1, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel1 = lv_label_create(ui_PanelDIGITAL1);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel1, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel1, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel1, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel1, "DIGITAL 1 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel1, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel1, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus1 = lv_label_create(ui_PanelDIGITAL1);
|
|
||||||
lv_obj_set_width(ui_digitalstatus1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus1, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus1, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus1, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus1, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus1, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus1, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL2 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL2, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL2, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL2, -196);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL2, -68);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL2, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel2 = lv_label_create(ui_PanelDIGITAL2);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel2, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel2, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel2, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel2, "DIGITAL 2 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel2, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel2, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus2 = lv_label_create(ui_PanelDIGITAL2);
|
|
||||||
lv_obj_set_width(ui_digitalstatus2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus2, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus2, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus2, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus2, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus2, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus2, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL3 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL3, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL3, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL3, -196);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL3, -3);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL3, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel3 = lv_label_create(ui_PanelDIGITAL3);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel3, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel3, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel3, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel3, "DIGITAL 3 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel3, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel3, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus3 = lv_label_create(ui_PanelDIGITAL3);
|
|
||||||
lv_obj_set_width(ui_digitalstatus3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus3, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus3, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus3, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus3, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus3, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus3, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL4 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL4, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL4, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL4, -195);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL4, 60);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL4, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL4, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel4 = lv_label_create(ui_PanelDIGITAL4);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel4, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel4, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel4, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel4, "DIGITAL 4 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel4, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel4, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus4 = lv_label_create(ui_PanelDIGITAL4);
|
|
||||||
lv_obj_set_width(ui_digitalstatus4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus4, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus4, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus4, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus4, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus4, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus4, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL5 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL5, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL5, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL5, -195);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL5, 124);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL5, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL5, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel5 = lv_label_create(ui_PanelDIGITAL5);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel5, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel5, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel5, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel5, "DIGITAL 5 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel5, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel5, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus5 = lv_label_create(ui_PanelDIGITAL5);
|
|
||||||
lv_obj_set_width(ui_digitalstatus5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus5, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus5, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus5, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus5, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus5, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus5, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL6 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL6, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL6, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL6, 194);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL6, -133);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL6, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL6, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel6 = lv_label_create(ui_PanelDIGITAL6);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel6, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel6, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel6, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel6, "DIGITAL 6 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel6, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel6, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus6 = lv_label_create(ui_PanelDIGITAL6);
|
|
||||||
lv_obj_set_width(ui_digitalstatus6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus6, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus6, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus6, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus6, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus6, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus6, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL7 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL7, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL7, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL7, 193);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL7, -68);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL7, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL7, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel7 = lv_label_create(ui_PanelDIGITAL7);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel7, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel7, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel7, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel7, "DIGITAL 7 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel7, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel7, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel7, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus7 = lv_label_create(ui_PanelDIGITAL7);
|
|
||||||
lv_obj_set_width(ui_digitalstatus7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus7, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus7, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus7, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus7, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus7, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus7, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL8 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL8, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL8, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL8, 194);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL8, -3);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL8, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL8, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel8 = lv_label_create(ui_PanelDIGITAL8);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel8, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel8, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel8, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel8, "DIGITAL 8 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel8, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel8, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel8, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus8 = lv_label_create(ui_PanelDIGITAL8);
|
|
||||||
lv_obj_set_width(ui_digitalstatus8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus8, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus8, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus8, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus8, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus8, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus8, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL9 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL9, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL9, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL9, 194);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL9, 59);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL9, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL9, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel9 = lv_label_create(ui_PanelDIGITAL9);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel9, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel9, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel9, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel9, "DIGITAL 9 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel9, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel9, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel9, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus9 = lv_label_create(ui_PanelDIGITAL9);
|
|
||||||
lv_obj_set_width(ui_digitalstatus9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus9, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus9, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus9, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus9, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus9, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus9, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_PanelDIGITAL10 = lv_obj_create(ui_Screen4);
|
|
||||||
lv_obj_set_width(ui_PanelDIGITAL10, 378);
|
|
||||||
lv_obj_set_height(ui_PanelDIGITAL10, 52);
|
|
||||||
lv_obj_set_x(ui_PanelDIGITAL10, 195);
|
|
||||||
lv_obj_set_y(ui_PanelDIGITAL10, 123);
|
|
||||||
lv_obj_set_align(ui_PanelDIGITAL10, LV_ALIGN_CENTER);
|
|
||||||
lv_obj_clear_flag(ui_PanelDIGITAL10, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
||||||
|
|
||||||
ui_DIGITALLabel10 = lv_label_create(ui_PanelDIGITAL10);
|
|
||||||
lv_obj_set_width(ui_DIGITALLabel10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_DIGITALLabel10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_DIGITALLabel10, -96);
|
|
||||||
lv_obj_set_y(ui_DIGITALLabel10, 1);
|
|
||||||
lv_obj_set_align(ui_DIGITALLabel10, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_DIGITALLabel10, "DIGITAL 10 STATUS");
|
|
||||||
lv_obj_set_style_text_color(ui_DIGITALLabel10, lv_color_hex(0xFF8500), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_opa(ui_DIGITALLabel10, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_style_text_font(ui_DIGITALLabel10, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
ui_digitalstatus10 = lv_label_create(ui_PanelDIGITAL10);
|
|
||||||
lv_obj_set_width(ui_digitalstatus10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_height(ui_digitalstatus10, LV_SIZE_CONTENT); /// 1
|
|
||||||
lv_obj_set_x(ui_digitalstatus10, 117);
|
|
||||||
lv_obj_set_y(ui_digitalstatus10, 0);
|
|
||||||
lv_obj_set_align(ui_digitalstatus10, LV_ALIGN_CENTER);
|
|
||||||
lv_label_set_text(ui_digitalstatus10, "OFF");
|
|
||||||
lv_obj_set_style_text_font(ui_digitalstatus10, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void ui_Screen4_screen_destroy(void)
|
|
||||||
{
|
|
||||||
if(ui_Screen4) lv_obj_del(ui_Screen4);
|
|
||||||
|
|
||||||
// NULL screen variables
|
|
||||||
ui_Screen4 = NULL;
|
|
||||||
ui_fueltitlepanel3 = NULL;
|
|
||||||
ui_fuellabeltitle3 = NULL;
|
|
||||||
ui_PanelDIGITAL1 = NULL;
|
|
||||||
ui_DIGITALLabel1 = NULL;
|
|
||||||
ui_digitalstatus1 = NULL;
|
|
||||||
ui_PanelDIGITAL2 = NULL;
|
|
||||||
ui_DIGITALLabel2 = NULL;
|
|
||||||
ui_digitalstatus2 = NULL;
|
|
||||||
ui_PanelDIGITAL3 = NULL;
|
|
||||||
ui_DIGITALLabel3 = NULL;
|
|
||||||
ui_digitalstatus3 = NULL;
|
|
||||||
ui_PanelDIGITAL4 = NULL;
|
|
||||||
ui_DIGITALLabel4 = NULL;
|
|
||||||
ui_digitalstatus4 = NULL;
|
|
||||||
ui_PanelDIGITAL5 = NULL;
|
|
||||||
ui_DIGITALLabel5 = NULL;
|
|
||||||
ui_digitalstatus5 = NULL;
|
|
||||||
ui_PanelDIGITAL6 = NULL;
|
|
||||||
ui_DIGITALLabel6 = NULL;
|
|
||||||
ui_digitalstatus6 = NULL;
|
|
||||||
ui_PanelDIGITAL7 = NULL;
|
|
||||||
ui_DIGITALLabel7 = NULL;
|
|
||||||
ui_digitalstatus7 = NULL;
|
|
||||||
ui_PanelDIGITAL8 = NULL;
|
|
||||||
ui_DIGITALLabel8 = NULL;
|
|
||||||
ui_digitalstatus8 = NULL;
|
|
||||||
ui_PanelDIGITAL9 = NULL;
|
|
||||||
ui_DIGITALLabel9 = NULL;
|
|
||||||
ui_digitalstatus9 = NULL;
|
|
||||||
ui_PanelDIGITAL10 = NULL;
|
|
||||||
ui_DIGITALLabel10 = NULL;
|
|
||||||
ui_digitalstatus10 = NULL;
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
192264
src/ui/ui_font_Consolas350.c
192264
src/ui/ui_font_Consolas350.c
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -1,347 +0,0 @@
|
||||||
// This file was generated by SquareLine Studio
|
|
||||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
|
||||||
// LVGL version: 8.3.6
|
|
||||||
// Project name: SquareLine_Project
|
|
||||||
|
|
||||||
#include "../../include/ui/ui_helpers.h"
|
|
||||||
|
|
||||||
void _ui_bar_set_property(lv_obj_t * target, int id, int val)
|
|
||||||
{
|
|
||||||
if(id == _UI_BAR_PROPERTY_VALUE_WITH_ANIM) lv_bar_set_value(target, val, LV_ANIM_ON);
|
|
||||||
if(id == _UI_BAR_PROPERTY_VALUE) lv_bar_set_value(target, val, LV_ANIM_OFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_basic_set_property(lv_obj_t * target, int id, int val)
|
|
||||||
{
|
|
||||||
if(id == _UI_BASIC_PROPERTY_POSITION_X) lv_obj_set_x(target, val);
|
|
||||||
if(id == _UI_BASIC_PROPERTY_POSITION_Y) lv_obj_set_y(target, val);
|
|
||||||
if(id == _UI_BASIC_PROPERTY_WIDTH) lv_obj_set_width(target, val);
|
|
||||||
if(id == _UI_BASIC_PROPERTY_HEIGHT) lv_obj_set_height(target, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val)
|
|
||||||
{
|
|
||||||
if(id == _UI_DROPDOWN_PROPERTY_SELECTED) lv_dropdown_set_selected(target, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val)
|
|
||||||
{
|
|
||||||
if(id == _UI_IMAGE_PROPERTY_IMAGE) lv_img_set_src(target, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_label_set_property(lv_obj_t * target, int id, const char * val)
|
|
||||||
{
|
|
||||||
if(id == _UI_LABEL_PROPERTY_TEXT) lv_label_set_text(target, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_roller_set_property(lv_obj_t * target, int id, int val)
|
|
||||||
{
|
|
||||||
if(id == _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM) lv_roller_set_selected(target, val, LV_ANIM_ON);
|
|
||||||
if(id == _UI_ROLLER_PROPERTY_SELECTED) lv_roller_set_selected(target, val, LV_ANIM_OFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_slider_set_property(lv_obj_t * target, int id, int val)
|
|
||||||
{
|
|
||||||
if(id == _UI_SLIDER_PROPERTY_VALUE_WITH_ANIM) lv_slider_set_value(target, val, LV_ANIM_ON);
|
|
||||||
if(id == _UI_SLIDER_PROPERTY_VALUE) lv_slider_set_value(target, val, LV_ANIM_OFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_screen_change(lv_obj_t ** target, lv_scr_load_anim_t fademode, int spd, int delay, void (*target_init)(void))
|
|
||||||
{
|
|
||||||
if(*target == NULL)
|
|
||||||
target_init();
|
|
||||||
lv_scr_load_anim(*target, fademode, spd, delay, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_screen_delete(lv_obj_t ** target)
|
|
||||||
{
|
|
||||||
if(*target == NULL) {
|
|
||||||
lv_obj_del(*target);
|
|
||||||
target = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_arc_increment(lv_obj_t * target, int val)
|
|
||||||
{
|
|
||||||
int old = lv_arc_get_value(target);
|
|
||||||
lv_arc_set_value(target, old + val);
|
|
||||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_bar_increment(lv_obj_t * target, int val, int anm)
|
|
||||||
{
|
|
||||||
int old = lv_bar_get_value(target);
|
|
||||||
lv_bar_set_value(target, old + val, anm);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_slider_increment(lv_obj_t * target, int val, int anm)
|
|
||||||
{
|
|
||||||
int old = lv_slider_get_value(target);
|
|
||||||
lv_slider_set_value(target, old + val, anm);
|
|
||||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea)
|
|
||||||
{
|
|
||||||
lv_keyboard_set_textarea(keyboard, textarea);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value)
|
|
||||||
{
|
|
||||||
if(value == _UI_MODIFY_FLAG_TOGGLE) {
|
|
||||||
if(lv_obj_has_flag(target, flag)) lv_obj_clear_flag(target, flag);
|
|
||||||
else lv_obj_add_flag(target, flag);
|
|
||||||
}
|
|
||||||
else if(value == _UI_MODIFY_FLAG_ADD) lv_obj_add_flag(target, flag);
|
|
||||||
else lv_obj_clear_flag(target, flag);
|
|
||||||
}
|
|
||||||
void _ui_state_modify(lv_obj_t * target, int32_t state, int value)
|
|
||||||
{
|
|
||||||
if(value == _UI_MODIFY_STATE_TOGGLE) {
|
|
||||||
if(lv_obj_has_state(target, state)) lv_obj_clear_state(target, state);
|
|
||||||
else lv_obj_add_state(target, state);
|
|
||||||
}
|
|
||||||
else if(value == _UI_MODIFY_STATE_ADD) lv_obj_add_state(target, state);
|
|
||||||
else lv_obj_clear_state(target, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_textarea_move_cursor(lv_obj_t * target, int val)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
if(val == UI_MOVE_CURSOR_UP) lv_textarea_cursor_up(target);
|
|
||||||
if(val == UI_MOVE_CURSOR_RIGHT) lv_textarea_cursor_right(target);
|
|
||||||
if(val == UI_MOVE_CURSOR_DOWN) lv_textarea_cursor_down(target);
|
|
||||||
if(val == UI_MOVE_CURSOR_LEFT) lv_textarea_cursor_left(target);
|
|
||||||
lv_obj_add_state(target, LV_STATE_FOCUSED);
|
|
||||||
}
|
|
||||||
|
|
||||||
void scr_unloaded_delete_cb(lv_event_t * e)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
lv_obj_t ** var = lv_event_get_user_data(e);
|
|
||||||
lv_obj_del(*var);
|
|
||||||
(*var) = NULL;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_opacity_set(lv_obj_t * target, int val)
|
|
||||||
{
|
|
||||||
lv_obj_set_style_opa(target, val, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_anim_callback_free_user_data(lv_anim_t * a)
|
|
||||||
{
|
|
||||||
lv_mem_free(a->user_data);
|
|
||||||
a->user_data = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
lv_obj_set_x(usr->target, v);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
lv_obj_set_y(usr->target, v);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
lv_obj_set_width(usr->target, v);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
lv_obj_set_height(usr->target, v);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
lv_obj_set_style_opa(usr->target, v, 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
lv_img_set_zoom(usr->target, v);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
lv_img_set_angle(usr->target, v);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_anim_callback_set_image_frame(lv_anim_t * a, int32_t v)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
usr->val = v;
|
|
||||||
|
|
||||||
if(v < 0) v = 0;
|
|
||||||
if(v >= usr->imgset_size) v = usr->imgset_size - 1;
|
|
||||||
lv_img_set_src(usr->target, usr->imgset[v]);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_x(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return lv_obj_get_x_aligned(usr->target);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_y(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return lv_obj_get_y_aligned(usr->target);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_width(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return lv_obj_get_width(usr->target);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_height(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return lv_obj_get_height(usr->target);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return lv_obj_get_style_opa(usr->target, 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return lv_img_get_zoom(usr->target);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return lv_img_get_angle(usr->target);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t * a)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
|
||||||
return usr->val;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix)
|
|
||||||
{
|
|
||||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
|
||||||
|
|
||||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_arc_get_value(src), postfix);
|
|
||||||
|
|
||||||
lv_label_set_text(trg, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix)
|
|
||||||
{
|
|
||||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
|
||||||
|
|
||||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_slider_get_value(src), postfix);
|
|
||||||
|
|
||||||
lv_label_set_text(trg, buf);
|
|
||||||
}
|
|
||||||
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * txt_on, const char * txt_off)
|
|
||||||
{
|
|
||||||
if(lv_obj_has_state(src, LV_STATE_CHECKED)) lv_label_set_text(trg, txt_on);
|
|
||||||
else lv_label_set_text(trg, txt_off);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _ui_spinbox_step(lv_obj_t * target, int val)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
if(val > 0) lv_spinbox_increment(target);
|
|
||||||
|
|
||||||
else lv_spinbox_decrement(target);
|
|
||||||
|
|
||||||
|
|
||||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _ui_switch_theme(int val)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef UI_THEME_ACTIVE
|
|
||||||
ui_theme_set(val);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue