BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
2123ee02
Commit
2123ee02
authored
Mar 04, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes with USE_LV_FILESYSTEM = 0
parent
6e94c70f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
lv_conf_templ.h
lv_conf_templ.h
+1
-1
lv_draw.c
lv_draw/lv_draw.c
+3
-1
lv_img.c
lv_objx/lv_img.c
+7
-7
No files found.
lv_conf_templ.h
View file @
2123ee02
...
...
@@ -59,7 +59,7 @@
/*Input device settings*/
#define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/
#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points*/
#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points
(required: USE_LV_REAL_DRAW = 1)
*/
#define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */
#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */
#define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/
...
...
lv_draw/lv_draw.c
View file @
2123ee02
...
...
@@ -395,6 +395,7 @@ void lv_draw_label(const lv_area_t * coords,const lv_area_t * mask, const lv_sty
void
lv_draw_img
(
const
lv_area_t
*
coords
,
const
lv_area_t
*
mask
,
const
lv_style_t
*
style
,
const
void
*
src
)
{
if
(
src
==
NULL
)
{
lv_draw_rect
(
coords
,
mask
,
&
lv_style_plain
);
lv_draw_label
(
coords
,
mask
,
&
lv_style_plain
,
"No
\n
data"
,
LV_TXT_FLAG_NONE
,
NULL
);
...
...
@@ -403,6 +404,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
const
uint8_t
*
u8_p
=
(
uint8_t
*
)
src
;
if
(
u8_p
[
0
]
>=
'A'
&&
u8_p
[
0
]
<=
'Z'
)
{
/*It will be a path of a file*/
#if USE_LV_FILESYSTEM
lv_fs_file_t
file
;
lv_fs_res_t
res
=
lv_fs_open
(
&
file
,
src
,
LV_FS_MODE_RD
);
if
(
res
==
LV_FS_RES_OK
)
{
...
...
@@ -467,7 +469,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
lv_draw_label
(
coords
,
mask
,
&
lv_style_plain
,
"No data"
,
LV_TXT_FLAG_NONE
,
NULL
);
}
}
#endif
}
else
{
const
lv_img_t
*
img_var
=
src
;
...
...
lv_objx/lv_img.c
View file @
2123ee02
...
...
@@ -14,10 +14,6 @@
#error "lv_img: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
#endif
#if USE_LV_FILESYSTEM == 0
#error "lv_img: lv_fs is required. Enable it in lv_conf.h (USE_LV_FILESYSTEM 1) "
#endif
#include "lv_img.h"
#include "../lv_themes/lv_theme.h"
#include "../lv_misc/lv_fs.h"
...
...
@@ -118,6 +114,11 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img)
lv_img_ext_t
*
ext
=
lv_obj_get_ext_attr
(
img
);
#if USE_LV_FILESYSTEM == 0
if
(
src_type
==
LV_IMG_SRC_FILE
)
src_type
=
LV_IMG_SRC_UNKNOWN
;
#endif
if
(
src_type
==
LV_IMG_SRC_UNKNOWN
)
{
if
(
ext
->
src_type
==
LV_IMG_SRC_SYMBOL
||
ext
->
src_type
==
LV_IMG_SRC_FILE
)
{
lv_mem_free
(
ext
->
src
);
...
...
@@ -127,7 +128,6 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img)
return
;
}
ext
->
src_type
=
src_type
;
if
(
src_type
==
LV_IMG_SRC_VARIABLE
)
{
...
...
@@ -138,7 +138,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img)
ext
->
alpha_byte
=
((
lv_img_t
*
)
src_img
)
->
header
.
alpha_byte
;
lv_obj_set_size
(
img
,
ext
->
w
,
ext
->
h
);
}
#if USE_LV_FILESYSTEM
else
if
(
src_type
==
LV_IMG_SRC_FILE
)
{
lv_fs_file_t
file
;
lv_fs_res_t
res
;
...
...
@@ -173,7 +173,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img)
}
}
#endif
else
if
(
src_type
==
LV_IMG_SRC_SYMBOL
)
{
lv_style_t
*
style
=
lv_obj_get_style
(
img
);
lv_point_t
size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment