Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5545ffc925 | ||
|
|
c8bee40410 | ||
|
|
755d363ecc | ||
|
|
dfd14fa778 | ||
|
|
1ab9aa5312 | ||
|
|
4d69cd865c | ||
|
|
832bef4346 | ||
|
|
d5b2a9b256 | ||
|
|
7640950216 | ||
|
|
8b605cc482 | ||
|
|
ece3495004 | ||
|
|
f6655c2aaf | ||
|
|
cba2aa95c8 | ||
|
|
660464c973 | ||
|
|
5156ee058d | ||
|
|
a0515ba30d | ||
|
|
1a46030918 | ||
|
|
f58dcd94fc | ||
|
|
d59bba12db | ||
|
|
5022476edc | ||
|
|
b884abae26 | ||
|
|
aa45d59852 | ||
|
|
55e95ed351 | ||
|
|
be485d7605 | ||
|
|
9024b72b48 | ||
|
|
9b998aa47d | ||
|
|
71913d300d | ||
|
|
284834e799 | ||
|
|
8544cc3806 | ||
|
|
62662f68e9 | ||
|
|
a283273bd2 | ||
|
|
9750c97aff | ||
|
|
2967172bee | ||
|
|
9e1b6166b0 |
2
.github/workflows/build_micropython.yml
vendored
2
.github/workflows/build_micropython.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Clone lv_micropython
|
||||
run: |
|
||||
git clone https://github.com/lvgl/lv_micropython.git .
|
||||
git checkout master
|
||||
git checkout release/v8
|
||||
- name: Initialize lv_bindings submodule
|
||||
run: git submodule update --init --recursive lib/lv_bindings
|
||||
- name: Update ${{ matrix.port }} port submodules
|
||||
|
||||
4
Kconfig
4
Kconfig
@@ -42,11 +42,9 @@ menu "LVGL configuration"
|
||||
|
||||
config LV_COLOR_SCREEN_TRANSP
|
||||
bool "Enable more complex drawing routines to manage screens transparency."
|
||||
depends on LV_COLOR_DEPTH_32
|
||||
help
|
||||
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
|
||||
The screen's `bg_opa` should be set to non LV_OPA_COVER value
|
||||
|
||||
config LV_COLOR_MIX_ROUND_OFS
|
||||
int "Adjust color mix functions rounding"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
#include "../../../lvgl.h"
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
|
||||
@@ -1,7 +1,68 @@
|
||||
# Changelog
|
||||
|
||||
## [v8.3.3](https://github.com/lvgl/lvgl/compare/v8.3.2...v8.3.3) 06 October 2022
|
||||
|
||||
## [v8.2.0](https://github.com/lvgl/lvgl/compare/v8.2.0...v8.2.0) 6 July 2022
|
||||
v8.3.3 is the same as v8.3.2. It was released only because the version number was set incorrectly in lvgl.h.
|
||||
|
||||
## [v8.3.2](https://github.com/lvgl/lvgl/compare/v8.3.1...v8.3.2) 27 September 2022
|
||||
|
||||
### Fixes
|
||||
|
||||
- fix(fragment): fixed child fragment event dispatch [`3683`](https://github.com/lvgl/lvgl/pull/3683)
|
||||
- fix(sdl): clear streaming/target texture with FillRect [`3682`](https://github.com/lvgl/lvgl/pull/3682)
|
||||
- fix(sdl): transformation with alpha (#3576) [`3678`](https://github.com/lvgl/lvgl/pull/3678)
|
||||
- fix(draw_sw): fix image cache to access the freed stack space [`3584`](https://github.com/lvgl/lvgl/pull/3584)
|
||||
- fix(style): use compile time prop_cnt for const styles [`3609`](https://github.com/lvgl/lvgl/pull/3609)
|
||||
- fix(demo): can not found lvgl.h file [`3477`](https://github.com/lvgl/lvgl/pull/3477)
|
||||
- fix(ci) checkout lv_micropython release/v8 branch [`3524`](https://github.com/lvgl/lvgl/pull/3524)
|
||||
- fix(canvas): fix clipéping on transformation [`b884aba`](https://github.com/lvgl/lvgl/commit/b884abae26f3824b27783a85d18ed51e550347c1)
|
||||
- fix(draw): allow drawing outline with LV_DRAW_COMPLEX == 0 too [`ece3495`](https://github.com/lvgl/lvgl/commit/ece34950040e218fc73605a4e88f1060c2a274f8)
|
||||
- fix(colorwheel): fix updating color when using lv_colorwheel_set_hsv [`d59bba1`](https://github.com/lvgl/lvgl/commit/d59bba12db115afb4b6aa53eed2625221dfff2fd)
|
||||
- fix(slider): find the nearest value on click instead of floor [`dfd14fa`](https://github.com/lvgl/lvgl/commit/dfd14fa778aef25d0db61748a58aa9989ce5e2c8)
|
||||
- fix(draw): fix border drawing with thick borders [`d5b2a9b`](https://github.com/lvgl/lvgl/commit/d5b2a9b2562cbfa327bf0ec03c11d28576037a14)
|
||||
- fix(refr): fix true double double buffering logic with transparent screens [`8b605cc`](https://github.com/lvgl/lvgl/commit/8b605cc48224d0497cdd936fa77229e0c3d606d2)
|
||||
- fix(group): be sure obj is removed from its current group in lv_group_add_obj [`5156ee0`](https://github.com/lvgl/lvgl/commit/5156ee058d5de674a00ffd84d15d460de7f0e53b)
|
||||
- fix(style): add missing invalidation in lv_obj_remove_local_style_prop [`a0515ba`](https://github.com/lvgl/lvgl/commit/a0515ba30dd74b8b22a6709d334eb03782ee1a4d)
|
||||
|
||||
### Docs
|
||||
|
||||
- docs(draw) remove reference to old lv_fs_add_drv function [`3564`](https://github.com/lvgl/lvgl/pull/3564)
|
||||
- docs(disp): LV_COLOR_SCREEN_TRANSP remove dependency on LV_COLOR_DEPTH_32 as transparency is supported across all color depths [`3556`](https://github.com/lvgl/lvgl/pull/3556)
|
||||
|
||||
### CI and tests
|
||||
|
||||
- ci: protect test.c with #if LV_BUILD_TEST [`be485d7`](https://github.com/lvgl/lvgl/commit/be485d7605136d2a5d6a633c7cb5b7c525cae7ee)
|
||||
|
||||
### Others
|
||||
|
||||
- chore(rt-thread) backport fixes from v9 [`3604`](https://github.com/lvgl/lvgl/pull/3604)
|
||||
|
||||
- chore: fix warnings [`7640950`](https://github.com/lvgl/lvgl/commit/76409502163ffe67cfbab9c7f24f2226cc8a5941)
|
||||
- remove accidentally added code [`5022476`](https://github.com/lvgl/lvgl/commit/5022476edc8676f2a6ef7b919d3578159edeef7c)
|
||||
|
||||
|
||||
## [v8.3.1](https://github.com/lvgl/lvgl/compare/v8.3.0...v8.3.1) 25 July 2022
|
||||
|
||||
### Fixes
|
||||
|
||||
- fix(led): add bg_color draw descriptors back to led draw event to support LV_DRAW_COMPLEX 0 [`3515`](https://github.com/lvgl/lvgl/pull/3515)
|
||||
- fix(slider): fix knob drawing in symmetrical mode [`2967172`](https://github.com/lvgl/lvgl/commit/2967172bee806e77da6ee2307c79e867af3f76bc)
|
||||
- fix(refr): fix lv_refr_get_top_obj [`9750c97`](https://github.com/lvgl/lvgl/commit/9750c97aff4dc3de80559b150852b829f006d6bf)
|
||||
- fix(arc): fix arc knob invalidation in SYMMETRICAL mode [`a283273`](https://github.com/lvgl/lvgl/commit/a283273bd27599dae6b044a941b6591ad45e059b)
|
||||
|
||||
### Examples
|
||||
|
||||
- example(freetype): Update the Micropython example to use the Lato font [`71913d3`](https://github.com/lvgl/lvgl/commit/71913d300dde25d1b87d1b44fa1fa47854defd59)
|
||||
- example(freetype): replace the arial font with lato to avoid licensing issues [`8544cc3`](https://github.com/lvgl/lvgl/commit/8544cc38062d9c817013bbe6aedbb47112e580ad)
|
||||
|
||||
### Docs
|
||||
|
||||
- docs(readme): fix LVGL version typo (8.3.0) [`3462`](https://github.com/lvgl/lvgl/pull/3462)
|
||||
- docs(tasmota): support LVGL 8.3.0 (#3511) [`62662f6`](https://github.com/lvgl/lvgl/commit/62662f68e9cf90adcb96d42030eca5fa135b96a5)
|
||||
|
||||
|
||||
|
||||
## [v8.3.0](https://github.com/lvgl/lvgl/compare/v8.2.0...v8.3.0) 6 July 2022
|
||||
|
||||
|
||||
### Overview
|
||||
|
||||
@@ -31,7 +31,7 @@ In 2021, Tasmota added full support of LVGL for ESP32 based devices. It also int
|
||||
|
||||
A comprehensive mapping of LVGL in Berry language is now available, similar to the mapping of Micropython. It allows to use +98% of all LVGL features. It is also possible to write custom widgets in Berry.
|
||||
|
||||
Versions supported: LVGL v8.0.2, LodePNG v20201017, Freetype 2.10.4
|
||||
Versions supported: LVGL v8.3.0, LodePNG v20201017, Freetype 2.10.4
|
||||
|
||||
### Tasmota + Berry + LVGL could be used for:
|
||||
|
||||
|
||||
@@ -63,11 +63,10 @@ See the [Display background](#display-background) section for more details. If t
|
||||
This configuration (transparent screen and display) could be used to create for example OSD menus where a video is played on a lower layer, and a menu is overlayed on an upper layer.
|
||||
|
||||
To handle transparent displays, special (slower) color mixing algorithms need to be used by LVGL so this feature needs to enabled with `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h`.
|
||||
As this mode operates on the Alpha channel of the pixels `LV_COLOR_DEPTH = 32` is also required. The Alpha channel of 32-bit colors will be 0 where there are no objects and 255 where there are solid objects.
|
||||
The Alpha channel of 32-bit colors will be 0 where there are no objects and 255 where there are solid objects.
|
||||
|
||||
In summary, to enable transparent screens and displays for OSD menu-like UIs:
|
||||
- Enable `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h`
|
||||
- Be sure to use `LV_COLOR_DEPTH 32`
|
||||
- Set the screen's opacity to `LV_OPA_TRANSP` e.g. with `lv_obj_set_style_local_bg_opa(lv_scr_act(), LV_OBJMASK_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP)`
|
||||
- Set the display opacity to `LV_OPA_TRANSP` with `lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP);`
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ extern void lv_port_indev_init(void);
|
||||
extern void lv_user_gui_init(void);
|
||||
|
||||
static struct rt_thread lvgl_thread;
|
||||
static rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE];
|
||||
static ALIGN(8) rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE];
|
||||
|
||||
#if LV_USE_LOG
|
||||
static void lv_rt_log(const char *buf)
|
||||
|
||||
4
env_support/rt-thread/squareline/README.md
Normal file
4
env_support/rt-thread/squareline/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
This folder is for LVGL SquareLine Studio
|
||||
|
||||
SquareLine Studio can automatically put the generated C files into `ui` folder, so that rt-thread will automatically detect them; or, as a user, you can move the generated C files into `ui` folder manually.
|
||||
|
||||
13
env_support/rt-thread/squareline/SConscript
Normal file
13
env_support/rt-thread/squareline/SConscript
Normal file
@@ -0,0 +1,13 @@
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
group = []
|
||||
src = []
|
||||
CPPPATH =[]
|
||||
|
||||
src += Glob(cwd + '/ui/*.c')
|
||||
CPPPATH += [cwd+'/ui']
|
||||
|
||||
group = group + DefineGroup('LVGL-SquareLine', src, depend = ['PKG_USING_LVGL_SQUARELINE'], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
19
env_support/rt-thread/squareline/ui/lv_ui_entry.c
Normal file
19
env_support/rt-thread/squareline/ui/lv_ui_entry.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-05-13 Meco Man First version
|
||||
*/
|
||||
|
||||
#ifdef __RTTHREAD__
|
||||
|
||||
void lv_user_gui_init(void)
|
||||
{
|
||||
extern void ui_init(void);
|
||||
ui_init();
|
||||
}
|
||||
|
||||
#endif /* __RTTHREAD__ */
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../lv_examples.h"
|
||||
#if LV_BUILD_EXAMPLES && LV_USE_SLIDER && LV_USE_CHART && LV_USE_BTN
|
||||
#if LV_BUILD_EXAMPLES && LV_USE_SLIDER && LV_USE_CHART && LV_USE_BTN && LV_USE_GRID
|
||||
|
||||
/**
|
||||
* the example show the use of cubic-bezier3 in animation.
|
||||
|
||||
BIN
examples/libs/freetype/Lato-Regular.ttf
Normal file
BIN
examples/libs/freetype/Lato-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
@@ -10,7 +10,7 @@ void lv_example_freetype_1(void)
|
||||
/*Create a font*/
|
||||
static lv_ft_info_t info;
|
||||
/*FreeType uses C standard file system, so no driver letter is required.*/
|
||||
info.name = "./lvgl/examples/libs/freetype/arial.ttf";
|
||||
info.name = "./lvgl/examples/libs/freetype/Lato-Regular.ttf";
|
||||
info.weight = 24;
|
||||
info.style = FT_FONT_STYLE_NORMAL;
|
||||
info.mem = NULL;
|
||||
|
||||
@@ -4,7 +4,7 @@ import display_driver
|
||||
import fs_driver
|
||||
|
||||
info = lv.ft_info_t()
|
||||
info.name ="./arial.ttf"
|
||||
info.name ="./Lato-Regular.ttf"
|
||||
info.weight = 24
|
||||
info.style = lv.FT_FONT_STYLE.NORMAL
|
||||
info.font_init()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lvgl",
|
||||
"version": "8.3.0",
|
||||
"version": "8.3.3",
|
||||
"keywords": "graphics, gui, embedded, tft, lvgl",
|
||||
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
|
||||
"repository": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name=lvgl
|
||||
version=8.3.0
|
||||
version=8.3.3
|
||||
author=kisvegabor
|
||||
maintainer=kisvegabor,embeddedt,pete-pjb
|
||||
sentence=Full-featured Graphics Library for Embedded Systems
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file lv_conf.h
|
||||
* Configuration file for v8.3.0
|
||||
* Configuration file for v8.3.3
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
2
lvgl.h
2
lvgl.h
@@ -15,7 +15,7 @@ extern "C" {
|
||||
***************************/
|
||||
#define LVGL_VERSION_MAJOR 8
|
||||
#define LVGL_VERSION_MINOR 3
|
||||
#define LVGL_VERSION_PATCH 0
|
||||
#define LVGL_VERSION_PATCH 3
|
||||
#define LVGL_VERSION_INFO ""
|
||||
|
||||
/*********************
|
||||
|
||||
@@ -113,6 +113,9 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj)
|
||||
|
||||
LV_LOG_TRACE("begin");
|
||||
|
||||
/*Be sure the object is removed from its current group*/
|
||||
lv_group_remove_obj(obj);
|
||||
|
||||
/*Do not add the object twice*/
|
||||
lv_obj_t ** obj_i;
|
||||
_LV_LL_READ(&group->obj_ll, obj_i) {
|
||||
|
||||
@@ -314,7 +314,12 @@ bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_sty
|
||||
/*The style is not found*/
|
||||
if(i == obj->style_cnt) return false;
|
||||
|
||||
return lv_style_remove_prop(obj->styles[i].style, prop);
|
||||
lv_res_t res = lv_style_remove_prop(obj->styles[i].style, prop);
|
||||
if(res == LV_RES_OK) {
|
||||
lv_obj_refresh_style(obj, selector, prop);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state,
|
||||
|
||||
@@ -323,15 +323,8 @@ void _lv_disp_refr_timer(lv_timer_t * tmr)
|
||||
|
||||
refr_invalid_areas();
|
||||
|
||||
|
||||
/*If refresh happened ...*/
|
||||
if(disp_refr->inv_p != 0) {
|
||||
if(disp_refr->driver->full_refresh) {
|
||||
lv_area_t disp_area;
|
||||
lv_area_set(&disp_area, 0, 0, lv_disp_get_hor_res(disp_refr) - 1, lv_disp_get_ver_res(disp_refr) - 1);
|
||||
disp_refr->driver->draw_ctx->buf_area = &disp_area;
|
||||
draw_buf_flush(disp_refr);
|
||||
}
|
||||
|
||||
/*Clean up*/
|
||||
lv_memset_00(disp_refr->inv_areas, sizeof(disp_refr->inv_areas));
|
||||
@@ -621,8 +614,11 @@ static void refr_area_part(lv_draw_ctx_t * draw_ctx)
|
||||
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
|
||||
|
||||
/* Below the `area_p` area will be redrawn into the draw buffer.
|
||||
* In single buffered mode wait here until the buffer is freed.*/
|
||||
if(draw_buf->buf1 && !draw_buf->buf2) {
|
||||
* In single buffered mode wait here until the buffer is freed.
|
||||
* In full double buffered mode wait here while the buffers are swapped and a buffer becomes available*/
|
||||
bool full_sized = draw_buf->size == (uint32_t)disp_refr->driver->hor_res * disp_refr->driver->ver_res;
|
||||
if((draw_buf->buf1 && !draw_buf->buf2) ||
|
||||
(draw_buf->buf1 && draw_buf->buf2 && full_sized)) {
|
||||
while(draw_buf->flushing) {
|
||||
if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver);
|
||||
}
|
||||
@@ -710,11 +706,7 @@ static void refr_area_part(lv_draw_ctx_t * draw_ctx)
|
||||
refr_obj_and_children(draw_ctx, lv_disp_get_layer_top(disp_refr));
|
||||
refr_obj_and_children(draw_ctx, lv_disp_get_layer_sys(disp_refr));
|
||||
|
||||
/*In true double buffered mode flush only once when all areas were rendered.
|
||||
*In normal mode flush after every area*/
|
||||
if(disp_refr->driver->full_refresh == false) {
|
||||
draw_buf_flush(disp_refr);
|
||||
}
|
||||
draw_buf_flush(disp_refr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -738,9 +730,9 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
|
||||
lv_event_send(obj, LV_EVENT_COVER_CHECK, &info);
|
||||
if(info.res == LV_COVER_RES_MASKED) return NULL;
|
||||
|
||||
uint32_t i;
|
||||
uint32_t child_cnt = lv_obj_get_child_cnt(obj);
|
||||
for(i = 0; i < child_cnt; i++) {
|
||||
int32_t i;
|
||||
int32_t child_cnt = lv_obj_get_child_cnt(obj);
|
||||
for(i = child_cnt - 1; i >= 0; i--) {
|
||||
lv_obj_t * child = obj->spec_attr->children[i];
|
||||
found_p = lv_refr_get_top_obj(area_p, child);
|
||||
|
||||
@@ -1189,24 +1181,13 @@ static void draw_buf_flush(lv_disp_t * disp)
|
||||
lv_draw_ctx_t * draw_ctx = disp->driver->draw_ctx;
|
||||
if(draw_ctx->wait_for_finish) draw_ctx->wait_for_finish(draw_ctx);
|
||||
|
||||
/* In double buffered mode wait until the other buffer is freed
|
||||
/* In partial double buffered mode wait until the other buffer is freed
|
||||
* and driver is ready to receive the new buffer */
|
||||
if(draw_buf->buf1 && draw_buf->buf2) {
|
||||
bool full_sized = draw_buf->size == (uint32_t)disp_refr->driver->hor_res * disp_refr->driver->ver_res;
|
||||
if(draw_buf->buf1 && draw_buf->buf2 && !full_sized) {
|
||||
while(draw_buf->flushing) {
|
||||
if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver);
|
||||
}
|
||||
|
||||
/*If the screen is transparent initialize it when the flushing is ready*/
|
||||
#if LV_COLOR_SCREEN_TRANSP
|
||||
if(disp_refr->driver->screen_transp) {
|
||||
if(disp_refr->driver->clear_cb) {
|
||||
disp_refr->driver->clear_cb(disp_refr->driver, disp_refr->driver->draw_buf->buf_act, disp_refr->driver->draw_buf->size);
|
||||
}
|
||||
else {
|
||||
lv_memset_00(disp_refr->driver->draw_buf->buf_act, disp_refr->driver->draw_buf->size * LV_IMG_PX_SIZE_ALPHA_BYTE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
draw_buf->flushing = 1;
|
||||
@@ -1225,6 +1206,7 @@ static void draw_buf_flush(lv_disp_t * disp)
|
||||
call_flush_cb(disp->driver, draw_ctx->buf_area, draw_ctx->buf);
|
||||
}
|
||||
}
|
||||
|
||||
/*If there are 2 buffers swap them. With direct mode swap only on the last area*/
|
||||
if(draw_buf->buf1 && draw_buf->buf2 && (!disp->driver->direct_mode || flushing_last)) {
|
||||
if(draw_buf->buf_act == draw_buf->buf1)
|
||||
|
||||
@@ -144,7 +144,7 @@ void _lv_img_decoder_init(void);
|
||||
* Get information about an image.
|
||||
* Try the created image decoder one by one. Once one is able to get info that info will be used.
|
||||
* @param src the image source. Can be
|
||||
* 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`)
|
||||
* 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register()`)
|
||||
* 2) Variable: Pointer to an `lv_img_dsc_t` variable
|
||||
* 3) Symbol: E.g. `LV_SYMBOL_OK`
|
||||
* @param header the image info will be stored here
|
||||
@@ -157,7 +157,7 @@ lv_res_t lv_img_decoder_get_info(const void * src, lv_img_header_t * header);
|
||||
* Try the created image decoders one by one. Once one is able to open the image that decoder is saved in `dsc`
|
||||
* @param dsc describes a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable.
|
||||
* @param src the image source. Can be
|
||||
* 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`)
|
||||
* 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register())`)
|
||||
* 2) Variable: Pointer to an `lv_img_dsc_t` variable
|
||||
* 3) Symbol: E.g. `LV_SYMBOL_OK`
|
||||
* @param color The color of the image with `LV_IMG_CF_ALPHA_...`
|
||||
|
||||
@@ -95,7 +95,10 @@ bool lv_draw_sdl_composite_begin(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coor
|
||||
internals->target_backup = SDL_GetRenderTarget(ctx->renderer);
|
||||
SDL_SetRenderTarget(ctx->renderer, internals->composition);
|
||||
SDL_SetRenderDrawColor(ctx->renderer, 255, 255, 255, 0);
|
||||
SDL_RenderClear(ctx->renderer);
|
||||
/* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
|
||||
SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_NONE);
|
||||
SDL_RenderFillRect(ctx->renderer, NULL);
|
||||
SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_BLEND);
|
||||
#if LV_GPU_SDL_CUSTOM_BLEND_MODE
|
||||
internals->mask = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM0, w, h);
|
||||
dump_masks(internals->mask, apply_area);
|
||||
|
||||
@@ -390,7 +390,10 @@ static SDL_Texture * img_rounded_frag_obtain(lv_draw_sdl_ctx_t * ctx, SDL_Textur
|
||||
SDL_Texture * old_target = SDL_GetRenderTarget(ctx->renderer);
|
||||
SDL_SetRenderTarget(ctx->renderer, img_frag);
|
||||
SDL_SetRenderDrawColor(ctx->renderer, 0, 0, 0, 0);
|
||||
SDL_RenderClear(ctx->renderer);
|
||||
/* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
|
||||
SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_NONE);
|
||||
SDL_RenderFillRect(ctx->renderer, NULL);
|
||||
SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_BLEND);
|
||||
|
||||
lv_area_t coords = {0, 0, w - 1, h - 1}, clip;
|
||||
lv_area_t frag_coords = {0, 0, full_frag_size - 1, full_frag_size - 1};
|
||||
|
||||
@@ -64,9 +64,17 @@ lv_draw_layer_ctx_t * lv_draw_sdl_layer_init(lv_draw_ctx_t * draw_ctx, lv_draw_l
|
||||
transform_ctx->target_rect.w = target_w;
|
||||
transform_ctx->target_rect.h = target_h;
|
||||
|
||||
layer_ctx->max_row_with_alpha = target_h;
|
||||
layer_ctx->max_row_with_no_alpha = target_h;
|
||||
|
||||
SDL_SetTextureBlendMode(transform_ctx->target, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderTarget(renderer, transform_ctx->target);
|
||||
SDL_RenderClear(renderer);
|
||||
|
||||
/* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
|
||||
SDL_RenderFillRect(renderer, NULL);
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
|
||||
/* Set proper drawing context for transform layer */
|
||||
ctx->internals->transform_count += 1;
|
||||
@@ -100,6 +108,7 @@ void lv_draw_sdl_layer_blend(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * lay
|
||||
lv_area_to_sdl_rect(layer_ctx->original.clip_area, &clip_rect);
|
||||
SDL_Point center = {.x = draw_dsc->pivot.x, .y = draw_dsc->pivot.y};
|
||||
SDL_RenderSetClipRect(renderer, &clip_rect);
|
||||
SDL_SetTextureAlphaMod(transform_ctx->target, draw_dsc->opa);
|
||||
SDL_RenderCopyEx(renderer, transform_ctx->target, &transform_ctx->target_rect, &trans_rect,
|
||||
draw_dsc->angle, ¢er, SDL_FLIP_NONE);
|
||||
SDL_RenderSetClipRect(renderer, NULL);
|
||||
|
||||
@@ -126,7 +126,10 @@ static SDL_Texture * line_texture_create(lv_draw_sdl_ctx_t * sdl_ctx, const lv_d
|
||||
SDL_SetRenderTarget(sdl_ctx->renderer, texture);
|
||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderDrawColor(sdl_ctx->renderer, 0xFF, 0xFF, 0xFF, 0x0);
|
||||
SDL_RenderClear(sdl_ctx->renderer);
|
||||
/* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
|
||||
SDL_SetRenderDrawBlendMode(sdl_ctx->renderer, SDL_BLENDMODE_NONE);
|
||||
SDL_RenderFillRect(sdl_ctx->renderer, NULL);
|
||||
SDL_SetRenderDrawBlendMode(sdl_ctx->renderer, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderDrawColor(sdl_ctx->renderer, 0xFF, 0xFF, 0xFF, 0xFF);
|
||||
SDL_Rect line_rect = {1 + dsc->width / 2, 1, length, dsc->width};
|
||||
SDL_RenderFillRect(sdl_ctx->renderer, &line_rect);
|
||||
|
||||
@@ -123,7 +123,6 @@ void lv_draw_sw_layer_blend(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_la
|
||||
img.header.w = lv_area_get_width(draw_ctx->buf_area);
|
||||
img.header.h = lv_area_get_height(draw_ctx->buf_area);
|
||||
img.header.cf = layer_sw_ctx->has_alpha ? LV_IMG_CF_TRUE_COLOR_ALPHA : LV_IMG_CF_TRUE_COLOR;
|
||||
lv_img_cache_invalidate_src(&img);
|
||||
|
||||
/*Restore the original draw_ctx*/
|
||||
draw_ctx->buf = layer_ctx->original.buf;
|
||||
@@ -135,6 +134,7 @@ void lv_draw_sw_layer_blend(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_la
|
||||
/*Blend the layer*/
|
||||
lv_draw_img(draw_ctx, draw_dsc, &layer_ctx->area_act, &img);
|
||||
lv_draw_wait_for_finish(draw_ctx);
|
||||
lv_img_cache_invalidate_src(&img);
|
||||
}
|
||||
|
||||
void lv_draw_sw_layer_destroy(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx)
|
||||
|
||||
@@ -1159,12 +1159,13 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
|
||||
|
||||
bool mask_any = lv_draw_mask_is_any(outer_area);
|
||||
|
||||
#if LV_DRAW_COMPLEX
|
||||
|
||||
if(!mask_any && rout == 0 && rin == 0) {
|
||||
draw_border_simple(draw_ctx, outer_area, inner_area, color, opa);
|
||||
return;
|
||||
}
|
||||
|
||||
#if LV_DRAW_COMPLEX
|
||||
/*Get clipped draw area which is the real draw area.
|
||||
*It is always the same or inside `coords`*/
|
||||
lv_area_t draw_area;
|
||||
@@ -1281,12 +1282,12 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
|
||||
/*Draw the corners*/
|
||||
lv_coord_t blend_w;
|
||||
|
||||
/*Left and right corner together is they close to eachother*/
|
||||
/*Left and right corner together if they are close to each other*/
|
||||
if(!split_hor) {
|
||||
/*Calculate the top corner and mirror it to the bottom*/
|
||||
blend_area.x1 = draw_area.x1;
|
||||
blend_area.x2 = draw_area.x2;
|
||||
lv_coord_t max_h = LV_MAX(rout, outer_area->y1 - inner_area->y1);
|
||||
lv_coord_t max_h = LV_MAX(rout, inner_area->y1 - outer_area->y1);
|
||||
for(h = 0; h < max_h; h++) {
|
||||
lv_coord_t top_y = outer_area->y1 + h;
|
||||
lv_coord_t bottom_y = outer_area->y2 - h;
|
||||
@@ -1375,6 +1376,13 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
|
||||
|
||||
#else /*LV_DRAW_COMPLEX*/
|
||||
LV_UNUSED(blend_mode);
|
||||
LV_UNUSED(rout);
|
||||
LV_UNUSED(rin);
|
||||
if(!mask_any) {
|
||||
draw_border_simple(draw_ctx, outer_area, inner_area, color, opa);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /*LV_DRAW_COMPLEX*/
|
||||
}
|
||||
static void draw_border_simple(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area, const lv_area_t * inner_area,
|
||||
|
||||
@@ -139,7 +139,6 @@ static inline uint8_t lv_obj_get_style_flex_grow(const lv_obj_t * obj, uint32_t
|
||||
return (uint8_t)v.num;
|
||||
}
|
||||
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
@@ -187,14 +187,15 @@ void lv_fragment_manager_replace(lv_fragment_manager_t * manager, lv_fragment_t
|
||||
bool lv_fragment_manager_send_event(lv_fragment_manager_t * manager, int code, void * userdata)
|
||||
{
|
||||
LV_ASSERT_NULL(manager);
|
||||
lv_fragment_stack_item_t * top = _lv_ll_get_tail(&manager->stack);
|
||||
if(!top) return false;
|
||||
lv_fragment_managed_states_t * states = top->states;
|
||||
lv_fragment_t * instance = states->instance;
|
||||
if(!instance) return false;
|
||||
if(lv_fragment_manager_send_event(instance->child_manager, code, userdata)) return true;
|
||||
if(!states->cls->event_cb) return false;
|
||||
return states->cls->event_cb(instance, code, userdata);
|
||||
lv_fragment_managed_states_t * p = NULL;
|
||||
_LV_LL_READ_BACK(&manager->attached, p) {
|
||||
if(!p->obj_created || p->destroying_obj) continue;
|
||||
lv_fragment_t * instance = p->instance;
|
||||
if(!instance) continue;
|
||||
if(lv_fragment_manager_send_event(instance->child_manager, code, userdata)) return true;
|
||||
if(p->cls->event_cb && p->cls->event_cb(instance, code, userdata)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t lv_fragment_manager_get_stack_size(lv_fragment_manager_t * manager)
|
||||
|
||||
@@ -613,7 +613,6 @@ static lv_res_t double_click_reset(lv_obj_t * obj)
|
||||
* We replace division by 255 by a division by 256, a.k.a a shift right by 8 bits.
|
||||
* This is wrong, but since this is only used to compute the pixels on the screen and not the final color, it's ok.
|
||||
*/
|
||||
static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t * r, uint8_t * g, uint8_t * b);
|
||||
static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t * r, uint8_t * g, uint8_t * b)
|
||||
{
|
||||
if(!s) {
|
||||
@@ -652,6 +651,11 @@ static lv_color_t angle_to_mode_color_fast(lv_obj_t * obj, uint16_t angle)
|
||||
uint8_t r = 0, g = 0, b = 0;
|
||||
static uint16_t h = 0;
|
||||
static uint8_t s = 0, v = 0, m = 255;
|
||||
static uint16_t angle_saved = 0xffff;
|
||||
|
||||
/*If the angle is different recalculate scaling*/
|
||||
if(angle_saved != angle) m = 255;
|
||||
angle_saved = angle;
|
||||
|
||||
switch(ext->mode) {
|
||||
default:
|
||||
|
||||
@@ -178,6 +178,7 @@ static void lv_led_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
lv_obj_init_draw_rect_dsc(obj, LV_PART_MAIN, &rect_dsc);
|
||||
|
||||
/*Use the original colors brightness to modify color->led*/
|
||||
rect_dsc.bg_color = lv_color_mix(led->color, lv_color_black(), lv_color_brightness(rect_dsc.bg_color));
|
||||
rect_dsc.bg_grad.stops[0].color = lv_color_mix(led->color, lv_color_black(),
|
||||
lv_color_brightness(rect_dsc.bg_grad.stops[0].color));
|
||||
rect_dsc.bg_grad.stops[1].color = lv_color_mix(led->color, lv_color_black(),
|
||||
@@ -187,6 +188,7 @@ static void lv_led_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
rect_dsc.outline_color = lv_color_mix(led->color, lv_color_black(), lv_color_brightness(rect_dsc.outline_color));
|
||||
|
||||
/*Mix. the color with black proportionally with brightness*/
|
||||
rect_dsc.bg_color = lv_color_mix(rect_dsc.bg_color, lv_color_black(), led->bright);
|
||||
rect_dsc.bg_grad.stops[0].color = lv_color_mix(rect_dsc.bg_grad.stops[0].color, lv_color_black(), led->bright);
|
||||
rect_dsc.bg_grad.stops[1].color = lv_color_mix(rect_dsc.bg_grad.stops[1].color, lv_color_black(), led->bright);
|
||||
rect_dsc.border_color = lv_color_mix(rect_dsc.border_color, lv_color_black(), led->bright);
|
||||
|
||||
@@ -49,11 +49,26 @@ extern "C" {
|
||||
#define LV_IMG_ZOOM_NONE 256 /*Value for not zooming the image*/
|
||||
LV_EXPORT_CONST_INT(LV_IMG_ZOOM_NONE);
|
||||
|
||||
// *INDENT-OFF*
|
||||
#if LV_USE_ASSERT_STYLE
|
||||
#define LV_STYLE_CONST_INIT(var_name, prop_array) const lv_style_t var_name = { .sentinel = LV_STYLE_SENTINEL_VALUE, .v_p = { .const_props = prop_array }, .has_group = 0xFF, .prop1 = LV_STYLE_PROP_ANY }
|
||||
#define LV_STYLE_CONST_INIT(var_name, prop_array) \
|
||||
const lv_style_t var_name = { \
|
||||
.sentinel = LV_STYLE_SENTINEL_VALUE, \
|
||||
.v_p = { .const_props = prop_array }, \
|
||||
.has_group = 0xFF, \
|
||||
.prop1 = LV_STYLE_PROP_ANY, \
|
||||
.prop_cnt = (sizeof(prop_array) / sizeof((prop_array)[0])), \
|
||||
}
|
||||
#else
|
||||
#define LV_STYLE_CONST_INIT(var_name, prop_array) const lv_style_t var_name = { .v_p = { .const_props = prop_array }, .has_group = 0xFF, .prop1 = LV_STYLE_PROP_ANY }
|
||||
#define LV_STYLE_CONST_INIT(var_name, prop_array) \
|
||||
const lv_style_t var_name = { \
|
||||
.v_p = { .const_props = prop_array }, \
|
||||
.has_group = 0xFF, \
|
||||
.prop1 = LV_STYLE_PROP_ANY, \
|
||||
.prop_cnt = (sizeof(prop_array) / sizeof((prop_array)[0])), \
|
||||
}
|
||||
#endif
|
||||
// *INDENT-ON*
|
||||
|
||||
/** On simple system, don't waste resources on gradients */
|
||||
#if !defined(LV_DRAW_COMPLEX) || !defined(LV_GRADIENT_MAX_STOPS)
|
||||
@@ -440,7 +455,9 @@ static inline lv_style_res_t lv_style_get_prop_inlined(const lv_style_t * style,
|
||||
{
|
||||
if(style->prop1 == LV_STYLE_PROP_ANY) {
|
||||
const lv_style_const_prop_t * const_prop;
|
||||
for(const_prop = style->v_p.const_props; const_prop->prop != LV_STYLE_PROP_INV; const_prop++) {
|
||||
uint32_t i;
|
||||
for(i = 0; i < style->prop_cnt; i++) {
|
||||
const_prop = style->v_p.const_props + i;
|
||||
lv_style_prop_t prop_id = LV_STYLE_PROP_ID_MASK(const_prop->prop);
|
||||
if(prop_id == prop) {
|
||||
if(const_prop->prop & LV_STYLE_PROP_META_INHERIT)
|
||||
|
||||
@@ -757,9 +757,15 @@ static lv_coord_t get_angle(const lv_obj_t * obj)
|
||||
angle += arc->indic_angle_start;
|
||||
}
|
||||
else if(arc->type == LV_ARC_MODE_SYMMETRICAL) {
|
||||
int32_t range_midpoint = (int32_t)(arc->min_value + arc->max_value) / 2;
|
||||
if(arc->value < range_midpoint) angle += arc->indic_angle_start;
|
||||
else angle += arc->indic_angle_end;
|
||||
int16_t bg_end = arc->bg_angle_end;
|
||||
if(arc->bg_angle_end < arc->bg_angle_start) bg_end = arc->bg_angle_end + 360;
|
||||
int16_t indic_end = arc->indic_angle_end;
|
||||
if(arc->indic_angle_end < arc->indic_angle_start) indic_end = arc->indic_angle_end + 360;
|
||||
|
||||
int32_t angle_midpoint = (int32_t)(arc->bg_angle_start + bg_end) / 2;
|
||||
if(arc->indic_angle_start < angle_midpoint) angle += arc->indic_angle_start;
|
||||
else if(indic_end > angle_midpoint) angle += arc->indic_angle_end;
|
||||
else angle += angle_midpoint;
|
||||
}
|
||||
|
||||
return angle;
|
||||
|
||||
@@ -181,10 +181,10 @@ void lv_canvas_transform(lv_obj_t * obj, lv_img_dsc_t * src_img, int16_t angle,
|
||||
draw_dsc.antialias = antialias;
|
||||
|
||||
lv_area_t dest_area;
|
||||
dest_area.x1 = 0;
|
||||
dest_area.x2 = dest_img->header.w - 1;
|
||||
dest_area.y1 = 0;
|
||||
dest_area.y2 = 0;
|
||||
dest_area.x1 = -offset_x;
|
||||
dest_area.x2 = dest_area.x1 + dest_img->header.w - 1;
|
||||
dest_area.y1 = -offset_y;
|
||||
dest_area.y2 = -offset_y;
|
||||
|
||||
lv_color_t * cbuf = lv_mem_alloc(dest_img->header.w * sizeof(lv_color_t));
|
||||
lv_opa_t * abuf = lv_mem_alloc(dest_img->header.w * sizeof(lv_opa_t));
|
||||
@@ -194,15 +194,12 @@ void lv_canvas_transform(lv_obj_t * obj, lv_img_dsc_t * src_img, int16_t angle,
|
||||
&draw_dsc, canvas->dsc.header.cf, cbuf, abuf);
|
||||
|
||||
for(x = 0; x < dest_img->header.w; x++) {
|
||||
if(x + offset_x < 0) continue;
|
||||
if(x + offset_x >= dest_img->header.w) break;
|
||||
if(abuf[x]) {
|
||||
lv_img_buf_set_px_color(dest_img, x + offset_x, y + offset_y, cbuf[x]);
|
||||
lv_img_buf_set_px_alpha(dest_img, x + offset_x, y + offset_y, abuf[x]);
|
||||
lv_img_buf_set_px_color(dest_img, x, y, cbuf[x]);
|
||||
lv_img_buf_set_px_alpha(dest_img, x, y, abuf[x]);
|
||||
}
|
||||
}
|
||||
|
||||
if(y + offset_y >= dest_img->header.h) break;
|
||||
dest_area.y1++;
|
||||
dest_area.y2++;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
/*Make the point relative to the indicator*/
|
||||
new_value = p.x - (obj->coords.x1 + bg_left);
|
||||
}
|
||||
new_value = (new_value * range) / indic_w;
|
||||
new_value = (new_value * range + indic_w / 2) / indic_w;
|
||||
new_value += slider->bar.min_value;
|
||||
}
|
||||
else {
|
||||
@@ -223,7 +223,7 @@ static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
|
||||
/*Make the point relative to the indicator*/
|
||||
new_value = p.y - (obj->coords.y2 + bg_bottom);
|
||||
new_value = (-new_value * range) / indic_h;
|
||||
new_value = (-new_value * range + indic_h / 2) / indic_h;
|
||||
new_value += slider->bar.min_value;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,6 @@ static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
}
|
||||
|
||||
new_value = LV_CLAMP(real_min_value, new_value, real_max_value);
|
||||
|
||||
if(*slider->value_to_set != new_value) {
|
||||
*slider->value_to_set = new_value;
|
||||
lv_obj_invalidate(obj);
|
||||
@@ -337,15 +336,16 @@ static void draw_knob(lv_event_t * e)
|
||||
|
||||
lv_area_t knob_area;
|
||||
lv_coord_t knob_size;
|
||||
bool is_symmetrical = false;
|
||||
if(slider->bar.mode == LV_BAR_MODE_SYMMETRICAL && slider->bar.min_value < 0 &&
|
||||
slider->bar.max_value > 0) is_symmetrical = true;
|
||||
|
||||
if(is_horizontal) {
|
||||
knob_size = lv_obj_get_height(obj);
|
||||
knob_area.x1 = LV_SLIDER_KNOB_COORD(is_rtl, slider->bar.indic_area);
|
||||
if(is_symmetrical && slider->bar.cur_value < 0) knob_area.x1 = slider->bar.indic_area.x1;
|
||||
else knob_area.x1 = LV_SLIDER_KNOB_COORD(is_rtl, slider->bar.indic_area);
|
||||
}
|
||||
else {
|
||||
bool is_symmetrical = false;
|
||||
if(slider->bar.mode == LV_BAR_MODE_SYMMETRICAL && slider->bar.min_value < 0 &&
|
||||
slider->bar.max_value > 0) is_symmetrical = true;
|
||||
|
||||
knob_size = lv_obj_get_width(obj);
|
||||
if(is_symmetrical && slider->bar.cur_value < 0) knob_area.y1 = slider->bar.indic_area.y2;
|
||||
else knob_area.y1 = slider->bar.indic_area.y1;
|
||||
|
||||
@@ -2,7 +2,7 @@ LVGL_DIR := $(CURDIR)/../..
|
||||
include ../../lvgl.mk
|
||||
|
||||
CSRCS += test.c
|
||||
CFLAGS += -DLV_CONF_SKIP=1 -I$(LVGL_DIR)/..
|
||||
CFLAGS += -DLV_CONF_SKIP=1 -DLV_BUILD_TEST=1 -I$(LVGL_DIR)/..
|
||||
COBJS := $(patsubst %.c, %.o, $(CSRCS))
|
||||
|
||||
test_file: $(COBJS)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#if LV_BUILD_TEST
|
||||
#include <stdio.h>
|
||||
#include "lvgl/lvgl.h"
|
||||
|
||||
@@ -5,3 +6,4 @@ int main(void) {
|
||||
lv_init();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user