lv_disp: invoke scr_load_internal upon completion #5062
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the feature or fix
[Version] release/v8.3
[Bugfix] An error involving accessing a null pointer occurs when using the following program:
I think the reason is: If call the
lv_scr_load_anim()
function consecutively twice, and meet the conditiontime != 0 || delay != 0
, on the second call, becausescr_load_internal()
setsd->scr_to_load = 0
, immediately following functions likelv_obj_set_pos()
will operate ond->scr_to_load
.Checkpoints
code-format.py
from the scripts folder. astyle needs to be installed.lv_conf_template.h
run lv_conf_internal_gen.py and update Kconfig.Be sure the following conventions are followed:
enum
s instead of macros. If inevitable to usedefine
s export them withLV_EXPORT_CONST_INT(defined_value)
right after thedefine
.type name[]
declaration for array parameters instead oftype * name
void *
pointersmalloc
into a static or global variables. Instead declare the variable inlv_global_t
structure inlv_global.h
and mark the variable with(LV_GLOBAL_DEFAULT()->variable)
when it's used. See a detailed description here.lv_<widget_name>_create(lv_obj_t * parent)
pattern.lv_<module_name>
and should receivelv_obj_t *
as first argument which is a pointer to widget object itself.struct
s should be used via an API and not modified directly via their elements.struct
APIs should follow the widgets' conventions. That is to receive a pointer to thestruct
as the first argument, and the prefix of thestruct
name should be used as the prefix of the function name too (e.g.lv_disp_set_default(lv_disp_t * disp)
)struct
s which are not part of the public API must begin with underscore in order to mark them as "private".struct
as the first argument. Thestruct
must containvoid * user_data
field.void * user_data
and the sameuser_data
needs to be passed as the last argument of the callback.xcb_t
.