mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-24 16:37:18 +08:00
chore(style): remove the trailing space from all source files (#3188)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -93,7 +93,7 @@ Basically, every modern controller (which is able to drive a display) is suitabl
|
||||
*Note that the memory usage might vary depending on the architecture, compiler and build options.*
|
||||
|
||||
### Supported platforms
|
||||
LVGL is completely platform independent and can be used with any MCU that fulfills the requirements.
|
||||
LVGL is completely platform independent and can be used with any MCU that fulfills the requirements.
|
||||
Just to mention some platforms:
|
||||
- NXP: Kinetis, LPC, iMX, iMX RT
|
||||
- STM32F1, STM32F3, STM32F4, STM32F7, STM32L4, STM32L5, STM32H7
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ LVGL是一个高度可裁剪、低资源占用、界面美观且易用的嵌入
|
||||
*注意:资源占用情况与具体硬件平台、编译器等因素有关,上表中仅给出参考值*
|
||||
|
||||
### 已经支持的平台
|
||||
LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求的微控制器均可运行LVGL。
|
||||
LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求的微控制器均可运行LVGL。
|
||||
如下仅列举其中一部分:
|
||||
|
||||
- NXP: Kinetis, LPC, iMX, iMX RT
|
||||
|
||||
+7
-7
@@ -1,7 +1,7 @@
|
||||
# Demos for LVGL
|
||||
|
||||
## Add the examples to your projects
|
||||
1. demos can be found in the 'demos' folder once you clone the lvgl.
|
||||
1. demos can be found in the 'demos' folder once you clone the lvgl.
|
||||
|
||||
2. In the ***lv_conf.h*** or equivalent places, you can find demo related macros, change its value to enable or disable specified demos:
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
...
|
||||
```
|
||||
|
||||
3. If your development environment or toolchain does not add source files inside '***lvgl***' folder automatically, ensure the `demos` folder is included for compilation.
|
||||
3. If your development environment or toolchain does not add source files inside '***lvgl***' folder automatically, ensure the `demos` folder is included for compilation.
|
||||
4. Include "***demos/lv_demos.h***" in your application source file, for example:
|
||||
|
||||
```c
|
||||
@@ -53,7 +53,7 @@
|
||||
## Demos
|
||||
|
||||
### Widgets
|
||||
Shows how the widgets look like out of the box using the built-in material theme.
|
||||
Shows how the widgets look like out of the box using the built-in material theme.
|
||||
|
||||
See in [widgets](https://github.com/lvgl/lvgl/tree/master/demos/widgets) folder.
|
||||
|
||||
@@ -68,14 +68,14 @@ For running this demo properly, please make sure **LV_MEM_SIZE** is at least **3
|
||||
|
||||
|
||||
### Music player
|
||||
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution.
|
||||
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution.
|
||||
|
||||
See in [music](https://github.com/lvgl/lvgl/tree/master/demos/music) folder.
|
||||
|
||||
<img src="https://github.com/lvgl/lvgl/tree/master/demos/music/screenshot1.gif?raw=true" width=600px alt="Music player demo with LVGL">
|
||||
|
||||
### Keypad and encoder
|
||||
LVGL allows you to control the widgets with a keypad and/or encoder without a touchpad. This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches, and text inputs without touchpad.
|
||||
LVGL allows you to control the widgets with a keypad and/or encoder without a touchpad. This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches, and text inputs without touchpad.
|
||||
Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder).
|
||||
|
||||
See in [keypad_encoder](https://github.com/lvgl/lvgl/tree/master/demos/keypad_encoder) folder.
|
||||
@@ -83,12 +83,12 @@ See in [keypad_encoder](https://github.com/lvgl/lvgl/tree/master/demos/keypad_en
|
||||
<img src="https://github.com/lvgl/lvgl/tree/master/demos/keypad_encoder/screenshot1.png?raw=true" width=600px alt="Keypad and encoder navigation in LVGL embedded GUI library">
|
||||
|
||||
### Benchmark
|
||||
A demo to measure the performance of LVGL or to compare different settings.
|
||||
A demo to measure the performance of LVGL or to compare different settings.
|
||||
See in [benchmark](https://github.com/lvgl/lvgl/tree/master/demos/benchmark) folder.
|
||||
<img src="https://github.com/lvgl/lvgl/tree/master/demos/benchmark/screenshot1.png?raw=true" width=600px alt="Benchmark demo with LVGL embedded GUI library">
|
||||
|
||||
### Stress
|
||||
A stress test for LVGL. It contains a lot of object creation, deletion, animations, style usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
|
||||
A stress test for LVGL. It contains a lot of object creation, deletion, animations, style usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
|
||||
See in [stress](https://github.com/lvgl/lvgl/tree/master/demos/stress) folder.
|
||||
<img src="https://github.com/lvgl/lvgl/tree/master/demos/stress/screenshot1.png?raw=true" width=600px alt="Stress test for LVGL">
|
||||
|
||||
|
||||
+13
-13
@@ -2,31 +2,31 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The benchmark demo tests the performance in various cases.
|
||||
For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc.
|
||||
The benchmark demo tests the performance in various cases.
|
||||
For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc.
|
||||
All tests are repeated with 50% opacity.
|
||||
|
||||
The size and position of the objects during testing are set with a pseudo random number to make the benchmark repeatable.
|
||||
The size and position of the objects during testing are set with a pseudo random number to make the benchmark repeatable.
|
||||
|
||||
On to top of the screen the title of the current test step, and the result of the previous step is displayed.
|
||||
|
||||
## Run the benchmark
|
||||
- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_BENCHMARK 1`
|
||||
- After `lv_init()` and initializing the drivers call `lv_demo_benchmark()`
|
||||
- If you only want to run a specific scene for any purpose (e.g. debug, performance optimization etc.), you can call `lv_demo_benchmark_run_scene()` instead of `lv_demo_benchmark()`and pass the scene number.
|
||||
- If you only want to run a specific scene for any purpose (e.g. debug, performance optimization etc.), you can call `lv_demo_benchmark_run_scene()` instead of `lv_demo_benchmark()`and pass the scene number.
|
||||
|
||||
|
||||
## Interpret the result
|
||||
|
||||
The FPS is measured like this:
|
||||
- load the next step
|
||||
- in the display driver's `monitor_cb` accumulate the time-to-render and the number of cycles
|
||||
- in the display driver's `monitor_cb` accumulate the time-to-render and the number of cycles
|
||||
- measure for 1 second
|
||||
- calculate `FPS = time_sum / render_cnt`
|
||||
|
||||
Note that it can result in very high FPS results for simple cases.
|
||||
E.g. if some simple rectangles are drawn in 5 ms, the benchmark will tell it's 200 FPS.
|
||||
So it ignores `LV_DISP_REFR_PERIOD` which tells LVGL how often it should refresh the screen.
|
||||
Note that it can result in very high FPS results for simple cases.
|
||||
E.g. if some simple rectangles are drawn in 5 ms, the benchmark will tell it's 200 FPS.
|
||||
So it ignores `LV_DISP_REFR_PERIOD` which tells LVGL how often it should refresh the screen.
|
||||
In other words, the benchmark shows the FPS from the pure rendering time.
|
||||
|
||||
By default, only the changed areas are refreshed. It means if only a few pixels are changed in 1 ms the benchmark will show 1000 FPS. To measure the performance with full screen refresh uncomment `lv_obj_invalidate(lv_scr_act())` in `monitor_cb()` in `lv_demo_benchmark.c`.
|
||||
@@ -34,14 +34,14 @@ By default, only the changed areas are refreshed. It means if only a few pixels
|
||||

|
||||
|
||||
|
||||
## Result summary
|
||||
## Result summary
|
||||
In the end, a table is created to display measured FPS values.
|
||||
|
||||
On top of the summary screen, the "Weighted FPS" value is shown.
|
||||
In this, the result of the more common cases are taken into account with a higher weight.
|
||||
On top of the summary screen, the "Weighted FPS" value is shown.
|
||||
In this, the result of the more common cases are taken into account with a higher weight.
|
||||
|
||||
"Opa. speed" shows the speed of the measurements with opacity compared to full opacity.
|
||||
E.g. "Opa. speed = 90%" means that rendering with opacity is 10% slower.
|
||||
"Opa. speed" shows the speed of the measurements with opacity compared to full opacity.
|
||||
E.g. "Opa. speed = 90%" means that rendering with opacity is 10% slower.
|
||||
|
||||
In the first section of the table, "Slow but common cases", those cases are displayed which are considered common but were slower than 20 FPS.
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
## Overview
|
||||
|
||||
LVGL allows you to control the widgets with keypad and/or encoder without touchpad.
|
||||
This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad.
|
||||
LVGL allows you to control the widgets with keypad and/or encoder without touchpad.
|
||||
This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad.
|
||||
Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder).
|
||||
|
||||

|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Music player demo
|
||||
|
||||
## Overview
|
||||
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution.
|
||||
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution.
|
||||
|
||||
|
||||

|
||||
@@ -15,7 +15,7 @@ The music player demo shows what kind of modern, smartphone-like user interfaces
|
||||
- `assets/spectrum.py` creates an array of spectrum values from a music. 4 band are created with 33 samples/sec: bass, bass-mid, mid, mid-treble.
|
||||
- The spectrum meter UI does the followings:
|
||||
- Zoom the album cover proportionality to the current bass value
|
||||
- Display the 4 bands on the left side of a circle by default at 0°, 45°, 90°, 135°
|
||||
- Display the 4 bands on the left side of a circle by default at 0°, 45°, 90°, 135°
|
||||
- Add extra bars next to the "main bars" with a cosine shape. Add more bars for the lower bands.
|
||||
- If there is a large enough bass, add a random offset to the position of the bars. E.g. start from 63° instead of 0°. (bars greater than 180° start again from 0°)
|
||||
- If there is no bass, add 1 to the offset of the bars (it creates a "walking" effect)
|
||||
|
||||
@@ -18,7 +18,7 @@ fs = int(len(S) / fn)
|
||||
fout.write("const uint16_t spectrum[][4] = {\n")
|
||||
for t in range(0,len(S[0]-1)):
|
||||
fout.write("{ ")
|
||||
f_prev = 0
|
||||
f_prev = 0
|
||||
for f in [8, 45, 300, 600]:
|
||||
v = 0
|
||||
for i in range(f_prev, f): v += S[i][t]
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
## Overview
|
||||
|
||||
A stress test for LVGL.
|
||||
It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
|
||||
A stress test for LVGL.
|
||||
It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ LV_DPI =130
|
||||
LV_ANIM_REPEAT_INFINITE = -1
|
||||
|
||||
# Register SDL display driver.
|
||||
|
||||
|
||||
disp_buf1 = lv.disp_buf_t()
|
||||
buf1_1 = bytes(480 * 10)
|
||||
disp_buf1.init(buf1_1, None, len(buf1_1)//4)
|
||||
@@ -32,7 +32,7 @@ disp_drv.register()
|
||||
# Register SDL mouse driver
|
||||
|
||||
indev_drv = lv.indev_drv_t()
|
||||
indev_drv.init()
|
||||
indev_drv.init()
|
||||
indev_drv.type = lv.INDEV_TYPE.POINTER
|
||||
indev_drv.read_cb = SDL.mouse_read
|
||||
indev_drv.register()
|
||||
@@ -55,7 +55,7 @@ def LV_DPX(n):
|
||||
return tmp
|
||||
else:
|
||||
return 1
|
||||
|
||||
|
||||
def color_chg_event_cb(sw, e):
|
||||
if e == lv.EVENT.VALUE_CHANGED:
|
||||
flag = lv.THEME_MATERIAL_FLAG.LIGHT
|
||||
@@ -63,7 +63,7 @@ def color_chg_event_cb(sw, e):
|
||||
flag=lv.THEME_MATERIAL_FLAG.DARK
|
||||
theme = lv.theme_material_init(LV_THEME_DEFAULT_COLOR_PRIMARY,LV_THEME_DEFAULT_COLOR_SECONDARY,flag,
|
||||
lv.theme_get_font_small(), lv.theme_get_font_normal(), lv.theme_get_font_subtitle(),
|
||||
lv.theme_get_font_title())
|
||||
lv.theme_get_font_title())
|
||||
def slider_event_cb(slider, e):
|
||||
if e == lv.EVENT.VALUE_CHANGED:
|
||||
if slider.get_type() == lv.slider.TYPE.NORMAL:
|
||||
@@ -75,19 +75,19 @@ def slider_event_cb(slider, e):
|
||||
slider_string = str(slider_left) + '-' + str(slider_right)
|
||||
# print("slider left value: %d, slider right value: %d"%(slider_left,slider_right))
|
||||
slider.set_style_local_value_str(lv.slider.PART.INDIC, lv.STATE.DEFAULT, slider_string)
|
||||
|
||||
|
||||
def linemeter_anim(a,lmeter, value):
|
||||
lmeter.set_value(value)
|
||||
label = lmeter.get_child(None)
|
||||
label.set_text(str(value))
|
||||
label.align(lmeter, lv.ALIGN.CENTER, 0, 0)
|
||||
|
||||
|
||||
def gauge_anim(a,gauge,val):
|
||||
gauge.set_value(0,val)
|
||||
label=gauge.get_child(None)
|
||||
label.set_text(str(val))
|
||||
label.align(gauge, lv.ALIGN.CENTER, 0, 0)
|
||||
|
||||
|
||||
def bar_anim(task,bar):
|
||||
val = bar.get_value()
|
||||
# print("bar value: ",val)
|
||||
@@ -95,11 +95,11 @@ def bar_anim(task,bar):
|
||||
val += 1
|
||||
if val > max_value:
|
||||
val=0
|
||||
bar.set_value(val,lv.ANIM.OFF)
|
||||
bar.set_value(val,lv.ANIM.OFF)
|
||||
cpy_string = "Copying %d/%d"% (val, max_value)
|
||||
# print(cpy_string)
|
||||
bar.set_style_local_value_str(lv.bar.PART.BG, lv.STATE.DEFAULT, cpy_string)
|
||||
|
||||
|
||||
def arc_phase1_ready_cb(a,arc):
|
||||
a_arc=lv.anim_t()
|
||||
a_arc.init()
|
||||
@@ -117,19 +117,19 @@ def arc_phase2_ready_cb(a,arc):
|
||||
a_arc.set_values(0, 360)
|
||||
a_arc.set_ready_cb(lambda a: arc_phase1_ready_cb(a,arc))
|
||||
lv.anim_t.start(a_arc)
|
||||
|
||||
|
||||
def anim_phase1(a,arc,val):
|
||||
arc.set_end_angle(val)
|
||||
label = arc.get_child(None)
|
||||
label.set_text(str(val))
|
||||
label.align(arc, lv.ALIGN.CENTER, 0, 0)
|
||||
|
||||
|
||||
def anim_phase2(a,arc,val):
|
||||
arc.set_end_angle(val)
|
||||
label = arc.get_child(None)
|
||||
label.set_text(str(val))
|
||||
label.align(arc, lv.ALIGN.CENTER, 0, 0)
|
||||
|
||||
|
||||
def controls_create(parent):
|
||||
lv.page.set_scrl_layout(lv.page.__cast__(parent), lv.LAYOUT.PRETTY_TOP)
|
||||
if LV_DEMO_WIDGETS_SLIDESHOW == 0:
|
||||
@@ -139,15 +139,15 @@ def controls_create(parent):
|
||||
btnm = lv.btnmatrix.__cast__(m.get_btnmatrix())
|
||||
# print("type(btnm): ",type(btnm))
|
||||
btnm.set_btn_ctrl(1, lv.btnmatrix.CTRL.CHECK_STATE)
|
||||
|
||||
|
||||
h = lv.cont(parent, None)
|
||||
h.set_layout(lv.LAYOUT.PRETTY_MID)
|
||||
h.add_style(lv.cont.PART.MAIN, style_box)
|
||||
h.set_drag_parent(True)
|
||||
|
||||
|
||||
h.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Basics")
|
||||
|
||||
disp_size = display.get_size_category()
|
||||
|
||||
disp_size = display.get_size_category()
|
||||
if disp_size <= lv.DISP_SIZE.SMALL:
|
||||
grid_w= lv.page.get_width_grid(lv.page.__cast__(parent),1,1)
|
||||
# print("grid_w: ",grid_w)
|
||||
@@ -157,23 +157,23 @@ def controls_create(parent):
|
||||
|
||||
h.set_fit2(lv.FIT.NONE, lv.FIT.TIGHT)
|
||||
h.set_width(grid_w)
|
||||
btn = lv.btn(h,None)
|
||||
btn = lv.btn(h,None)
|
||||
btn.set_fit2(lv.FIT.NONE, lv.FIT.TIGHT)
|
||||
if disp_size <= lv.DISP_SIZE.SMALL:
|
||||
button_width=h.get_width_grid(1,1)
|
||||
else:
|
||||
button_width=h.get_width_grid(2,1)
|
||||
# print("button_width: %d"%button_width)
|
||||
|
||||
|
||||
btn.set_width(button_width)
|
||||
label = lv.label(btn, None)
|
||||
label.set_text("Button")
|
||||
|
||||
|
||||
btn = lv.btn(h, btn)
|
||||
btn.toggle()
|
||||
label = lv.label(btn, None)
|
||||
label.set_text("Button")
|
||||
|
||||
|
||||
lv.switch(h, None)
|
||||
|
||||
lv.checkbox(h, None)
|
||||
@@ -184,7 +184,7 @@ def controls_create(parent):
|
||||
slider.set_value(40, lv.ANIM.OFF)
|
||||
slider.set_event_cb(slider_event_cb)
|
||||
slider.set_width_margin(fit_w);
|
||||
|
||||
|
||||
# Use the knobs style value the display the current value in focused state
|
||||
slider.set_style_local_margin_top(lv.slider.PART.BG, lv.STATE.DEFAULT, LV_DPX(25))
|
||||
slider.set_style_local_value_font(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.theme_get_font_small())
|
||||
@@ -194,7 +194,7 @@ def controls_create(parent):
|
||||
slider.set_style_local_transition_time(lv.slider.PART.KNOB, lv.STATE.DEFAULT, 300)
|
||||
slider.set_style_local_transition_prop_5(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.STYLE.VALUE_OFS_Y)
|
||||
slider.set_style_local_transition_prop_6(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.STYLE.VALUE_OPA)
|
||||
|
||||
|
||||
slider = lv.slider(h, None)
|
||||
slider.set_type(lv.slider.TYPE.RANGE)
|
||||
slider.set_value(70, lv.ANIM.OFF)
|
||||
@@ -206,11 +206,11 @@ def controls_create(parent):
|
||||
lv.event_send(slider,lv.EVENT.VALUE_CHANGED, None) # To refresh the text
|
||||
if slider.get_width() > fit_w:
|
||||
slider.set_width(fit_w)
|
||||
|
||||
|
||||
h = lv.cont(parent, h)
|
||||
h.set_fit(lv.FIT.NONE)
|
||||
h.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Text input")
|
||||
|
||||
|
||||
ta = lv.textarea(h, None)
|
||||
lv.cont.set_fit2(h,lv.FIT.PARENT, lv.FIT.NONE)
|
||||
ta.set_text("")
|
||||
@@ -258,7 +258,7 @@ def visuals_create(parent):
|
||||
chart.set_div_line_count(3, 0)
|
||||
chart.set_point_count(8)
|
||||
chart.set_type(lv.chart.TYPE.LINE)
|
||||
|
||||
|
||||
if disp_size > lv.DISP_SIZE.SMALL:
|
||||
chart.set_style_local_pad_left(lv.chart.PART.BG, lv.STATE.DEFAULT, 4 * (LV_DPI // 10))
|
||||
chart.set_style_local_pad_bottom(lv.chart.PART.BG, lv.STATE.DEFAULT, 3 * (LV_DPI // 10))
|
||||
@@ -268,7 +268,7 @@ def visuals_create(parent):
|
||||
chart.set_x_tick_length(0, 0)
|
||||
chart.set_y_tick_texts("600\n500\n400\n300\n200", 0, lv.chart.AXIS.DRAW_LAST_TICK)
|
||||
chart.set_x_tick_texts("Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug", 0, lv.chart.AXIS.DRAW_LAST_TICK)
|
||||
|
||||
|
||||
s1 = chart.add_series(LV_THEME_DEFAULT_COLOR_PRIMARY)
|
||||
s2 = chart.add_series(LV_THEME_DEFAULT_COLOR_SECONDARY)
|
||||
|
||||
@@ -282,7 +282,7 @@ def visuals_create(parent):
|
||||
chart.set_next(s1, 60)
|
||||
chart.set_next(s1, 10)
|
||||
chart.set_next(s1, 90)
|
||||
|
||||
|
||||
chart.set_next(s2, 32)
|
||||
chart.set_next(s2, 66)
|
||||
chart.set_next(s2, 5)
|
||||
@@ -333,7 +333,7 @@ def visuals_create(parent):
|
||||
grid_w_meter = lv.page.get_width_grid(page, 2, 1)
|
||||
else:
|
||||
grid_w_meter = lv.page.get_width_grid(page, 3, 1)
|
||||
|
||||
|
||||
meter_h = lv.page.get_height_fit(page)
|
||||
if grid_w_meter < meter_h:
|
||||
meter_size = grid_w_meter
|
||||
@@ -359,7 +359,7 @@ def visuals_create(parent):
|
||||
a_lm.set_playback_time(1000)
|
||||
a_lm.set_repeat_count(LV_ANIM_REPEAT_INFINITE)
|
||||
lv.anim_t.start(a_lm)
|
||||
|
||||
|
||||
gauge = lv.gauge(parent, None)
|
||||
gauge.set_drag_parent(True)
|
||||
gauge.set_size(meter_size, meter_size)
|
||||
@@ -378,7 +378,7 @@ def visuals_create(parent):
|
||||
a_ga.set_repeat_count(LV_ANIM_REPEAT_INFINITE)
|
||||
a_ga.set_custom_exec_cb(lambda a, val: gauge_anim(a,gauge,val))
|
||||
lv.anim_t.start(a_ga)
|
||||
|
||||
|
||||
arc = lv.arc(parent,None)
|
||||
arc.set_drag_parent(True)
|
||||
arc.set_bg_angles(0, 360)
|
||||
@@ -412,7 +412,7 @@ def visuals_create(parent):
|
||||
bar_h.set_width(lv.page.get_width_grid(page, 2, 1))
|
||||
else:
|
||||
bar_h.set_width(lv.page.get_width_grid(parent, 3, 2))
|
||||
|
||||
|
||||
bar = lv.bar(bar_h,None)
|
||||
bar.set_width(lv.cont.get_width_fit(bar_h))
|
||||
bar.set_style_local_value_font(lv.bar.PART.BG, lv.STATE.DEFAULT, lv.theme_get_font_small())
|
||||
@@ -421,7 +421,7 @@ def visuals_create(parent):
|
||||
bar.set_style_local_margin_bottom(lv.bar.PART.BG, lv.STATE.DEFAULT, LV_DPI // 7)
|
||||
bar.align(None, lv.ALIGN.CENTER, 0, 0)
|
||||
bar.set_value(30,lv.ANIM.OFF)
|
||||
|
||||
|
||||
led_h = lv.cont(parent, None)
|
||||
led_h.set_layout(lv.LAYOUT.PRETTY_MID)
|
||||
if disp_size <= lv.DISP_SIZE.SMALL:
|
||||
@@ -459,9 +459,9 @@ def visuals_create(parent):
|
||||
def selectors_create(parent):
|
||||
page = lv.page.__cast__(parent)
|
||||
lv.page.set_scrl_layout(page, lv.LAYOUT.PRETTY_MID)
|
||||
|
||||
|
||||
grid_h = page.get_height_grid(1, 1)
|
||||
|
||||
|
||||
if disp_size <= lv.DISP_SIZE.SMALL:
|
||||
grid_w = page.get_width_grid(1, 1)
|
||||
else:
|
||||
@@ -497,7 +497,7 @@ def selectors_create(parent):
|
||||
h.set_style_local_pad_top(lv.cont.PART_MAIN, LV_STATE_DEFAULT, 0);
|
||||
h.set_size(min(grid_h, grid_w), min(grid_h, grid_w))
|
||||
h.set_layout(lv.LAYOUT.PRETTY_TOP)
|
||||
|
||||
|
||||
roller = lv.roller(h, None)
|
||||
roller.add_style(lv.cont.PART.MAIN, style_box)
|
||||
roller.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Roller")
|
||||
@@ -508,8 +508,8 @@ def selectors_create(parent):
|
||||
roller.set_width(lv.cont.get_width_grid(h, 1 , 1))
|
||||
else:
|
||||
roller.set_width(lv.cont.get_width_grid(h, 2 , 1))
|
||||
|
||||
|
||||
|
||||
|
||||
dd = lv.dropdown(h, None)
|
||||
dd.add_style(lv.cont.PART.MAIN, style_box)
|
||||
dd.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Dropdown")
|
||||
@@ -517,20 +517,20 @@ def selectors_create(parent):
|
||||
dd.set_width(lv.cont.get_width_grid(h, 1 , 1))
|
||||
else:
|
||||
dd.set_width(lv.cont.get_width_grid(h, 2 , 1))
|
||||
|
||||
|
||||
dd.set_options("Alpha\nBravo\nCharlie\nDelta\nEcho\nFoxtrot\nGolf\nHotel\nIndia\nJuliette\nKilo\nLima\nMike\nNovember\n"
|
||||
"Oscar\nPapa\nQuebec\nRomeo\nSierra\nTango\nUniform\nVictor\nWhiskey\nXray\nYankee\nZulu")
|
||||
|
||||
|
||||
list = lv.list(parent, None)
|
||||
list.set_scroll_propagation(True)
|
||||
list.set_size(grid_w, grid_h)
|
||||
|
||||
|
||||
txts = [lv.SYMBOL.SAVE, "Save", lv.SYMBOL.CUT, "Cut", lv.SYMBOL.COPY, "Copy",
|
||||
lv.SYMBOL.OK, "This is a quite long text to scroll on the list", lv.SYMBOL.EDIT, "Edit", lv.SYMBOL.WIFI, "Wifi",
|
||||
lv.SYMBOL.BLUETOOTH, "Bluetooth", lv.SYMBOL.GPS, "GPS", lv.SYMBOL.USB, "USB",
|
||||
lv.SYMBOL.SD_CARD, "SD card", lv.SYMBOL.CLOSE, "Close"]
|
||||
|
||||
|
||||
|
||||
|
||||
for i in range(0,len(txts)//2,2):
|
||||
btn = list.add_btn(txts[i], txts[i + 1]);
|
||||
lv.btn.set_checkable(lv.btn.__cast__(btn),True)
|
||||
@@ -538,9 +538,9 @@ def selectors_create(parent):
|
||||
# Make a button disabled
|
||||
if i == 4:
|
||||
btn.set_state(lv.btn.STATE.DISABLED)
|
||||
|
||||
|
||||
cal.set_highlighted_dates(hl, 2)
|
||||
|
||||
|
||||
tv = lv.tabview(lv.scr_act(), None)
|
||||
display = scr.get_disp()
|
||||
disp_size = display.get_size_category()
|
||||
@@ -549,7 +549,7 @@ tv.set_style_local_pad_left(lv.tabview.PART.TAB_BG, lv.STATE.DEFAULT, disp_drv.h
|
||||
sw = lv.switch(lv.scr_act(), None)
|
||||
if lv.theme_get_flags() & lv.THEME_MATERIAL_FLAG.DARK:
|
||||
sw.on(LV_ANIM_OFF)
|
||||
sw.set_event_cb(color_chg_event_cb)
|
||||
sw.set_event_cb(color_chg_event_cb)
|
||||
sw.set_pos(LV_DPX(10), LV_DPX(10))
|
||||
sw.set_style_local_value_str(lv.switch.PART.BG, lv.STATE.DEFAULT, "Dark")
|
||||
sw.set_style_local_value_align(lv.switch.PART.BG, lv.STATE.DEFAULT, lv.ALIGN.OUT_RIGHT_MID)
|
||||
@@ -567,6 +567,6 @@ style_box.set_value_ofs_y(lv.STATE.DEFAULT, - LV_DPX(10))
|
||||
style_box.set_margin_top(lv.STATE.DEFAULT, LV_DPX(30))
|
||||
|
||||
controls_create(t1)
|
||||
visuals_create(t2)
|
||||
visuals_create(t2)
|
||||
selectors_create(t3)
|
||||
|
||||
|
||||
+114
-114
@@ -6,13 +6,13 @@
|
||||
|
||||
### Overview
|
||||
|
||||
Among many fixes and minor updates these are the most important features in v8.2.0:
|
||||
Among many fixes and minor updates these are the most important features in v8.2.0:
|
||||
- Abstract render layer to make it easier to attach external draw engines
|
||||
- Add `LV_FLAD_OVERFLOW_VISIBLE`. If enabled the children of an object won't be clipped to the boundary of the object
|
||||
- Add ffmpeg decoder support to play videos and open a wide variety of image formats
|
||||
- Add font fallback support
|
||||
- Add font fallback support
|
||||
- Add gradient dithering support
|
||||
- Add "monkey test"
|
||||
- Add "monkey test"
|
||||
- Add cmsis-pack support
|
||||
- Add Grid navigation (`lv_gridnav`)
|
||||
|
||||
@@ -23,7 +23,7 @@ The GPU support for NXP microcontrollers is still not updated to the new draw ar
|
||||
- :warning: feat(fs): add caching option for lv_fs-read [`2979`](https://github.com/littlevgl/lvgl/pull/2979)
|
||||
- :warning: feat(span): lv_spangroup_get_expand_width() adds a parameter [`2968`](https://github.com/littlevgl/lvgl/pull/2968)
|
||||
- :warning: arch(draw): allow replacing the draw engine [`db53ea9`](https://github.com/littlevgl/lvgl/commit/db53ea925c9502b20f38db0fc30c4ef599bdfc33)
|
||||
- :warning: indexed images are not chroma keyed. Use the alpha chaneel instead.
|
||||
- :warning: indexed images are not chroma keyed. Use the alpha chaneel instead.
|
||||
|
||||
### Architectural
|
||||
|
||||
@@ -275,12 +275,12 @@ The GPU support for NXP microcontrollers is still not updated to the new draw ar
|
||||
## [v8.1.0](https://github.com/lvgl/lvgl/compare/v8.0.2...v8.1.0) 10 November 2021
|
||||
|
||||
### Overview
|
||||
v8.1 is a minor release, so besides many fixes it contains a lot of new features too.
|
||||
v8.1 is a minor release, so besides many fixes it contains a lot of new features too.
|
||||
|
||||
Some of the most important features are
|
||||
- Built in support for SDL based GPU drawing
|
||||
- Much faster circle drawing in the software renderer
|
||||
- Several [3rd party libraries](https://docs.lvgl.io/master/libs/index.html) are merged directly into LVGL.
|
||||
- Several [3rd party libraries](https://docs.lvgl.io/master/libs/index.html) are merged directly into LVGL.
|
||||
- Add LVGL as an [RT-Thread](https://packages.rt-thread.org/en/detail.html?package=LVGL) and [ESP32](https://components.espressif.com/component/lvgl/lvgl) component
|
||||
|
||||
### Breaking Changes
|
||||
@@ -885,104 +885,104 @@ Some of the most important features are
|
||||
- fix(imgbtn) use the correct src in LV_EVENT_GET_SELF_SIZE
|
||||
- fix(color) remove extraneous cast for 8-bit color
|
||||
- fix(obj style) fix children reposition if the parent's padding changes.
|
||||
- fix(color) remove extraneous _LV_COLOR_MAKE_TYPE_HELPER (#2372)
|
||||
- fix(spinner) should not be clickable (#2373)
|
||||
- fix(obj) improve how the focusing indev is determined
|
||||
- fix(template) update indev template for v8
|
||||
- fix(printf) skip defining attribute if pycparser is used
|
||||
- refactor(printf) add printf-like function attribute to _lv_txt_set_text_vfmt and lv_label_set_text_fmt (#2332)
|
||||
- fix(template) include lvgl.h in lv_port_*_template.c files
|
||||
- fix(obj) detecting which indev sent LV_EVENT_FOCUS
|
||||
- fix (span) fill LV_EVENT_GET_SELF_SIZE (#2360)
|
||||
- fix(arc) disable LV_OBJ_FLAG_SCROLL_CHAIN by default
|
||||
- fix (draw) fix arc bg image drawing with full arcs
|
||||
- fix(disp) fix memory leak in lv_disp_remove (#2355)
|
||||
- fix warnings introduced by 3fb8baf5
|
||||
- fix(widgets) use lv_obj_class for all the widgets
|
||||
- fix(color) remove extraneous _LV_COLOR_MAKE_TYPE_HELPER (#2372)
|
||||
- fix(spinner) should not be clickable (#2373)
|
||||
- fix(obj) improve how the focusing indev is determined
|
||||
- fix(template) update indev template for v8
|
||||
- fix(printf) skip defining attribute if pycparser is used
|
||||
- refactor(printf) add printf-like function attribute to _lv_txt_set_text_vfmt and lv_label_set_text_fmt (#2332)
|
||||
- fix(template) include lvgl.h in lv_port_*_template.c files
|
||||
- fix(obj) detecting which indev sent LV_EVENT_FOCUS
|
||||
- fix (span) fill LV_EVENT_GET_SELF_SIZE (#2360)
|
||||
- fix(arc) disable LV_OBJ_FLAG_SCROLL_CHAIN by default
|
||||
- fix (draw) fix arc bg image drawing with full arcs
|
||||
- fix(disp) fix memory leak in lv_disp_remove (#2355)
|
||||
- fix warnings introduced by 3fb8baf5
|
||||
- fix(widgets) use lv_obj_class for all the widgets
|
||||
- fix(obj) move clean ups from lv_obj_del to lv_obj_destructor
|
||||
- fix(roller) fix partial redraw of the selected area
|
||||
- fix(roller) adjust the size of the selected area correctly
|
||||
- fix(obj) delete useless type conversion (#2343)
|
||||
- fix(roller) fix partial redraw of the selected area
|
||||
- fix(roller) adjust the size of the selected area correctly
|
||||
- fix(obj) delete useless type conversion (#2343)
|
||||
- fix(lv_obj_scroll.h) typos (#2345)
|
||||
- fix(scroll) fire LV_EVENT_SCROLL_BEGIN in the same spot for both axes
|
||||
- fix(btnmatrix) fix button invalidation on focus change
|
||||
- fix(textarea) style update in oneline mode + improve scroll to cursor
|
||||
- fix(tlsf) do not use <assert.h>
|
||||
- fix(imgbtn) consider width==LV_SIZE_CONTENT if only mid. img is set
|
||||
- fix(refr) reduce the nesting level in lv_refr_area
|
||||
- fix(txt) enhance the function of break_chars (#2327)
|
||||
- fix(pxp): update RTOS macro for SDK 2.10
|
||||
- fix(vglite): update for v8
|
||||
- fix(pxp): update for v8
|
||||
- fix(flex) fix layout update and invalidation issues
|
||||
- fix(flex) fix NULL pointer dereference
|
||||
- fix(obj, switch) do not send LV_EVENT_VALUE_CHANGED twice
|
||||
- fix(color) overflow with 16-bit color depth
|
||||
- fix(coords) fix using large coordinates
|
||||
- fix(chart) fix crash if no series are added
|
||||
- fix(chart) invalidation with LV_CHART_UPDATE_MODE_SHIFT
|
||||
- fix(btnmatrix) fix button invalidation on focus change
|
||||
- fix(textarea) style update in oneline mode + improve scroll to cursor
|
||||
- fix(tlsf) do not use <assert.h>
|
||||
- fix(imgbtn) consider width==LV_SIZE_CONTENT if only mid. img is set
|
||||
- fix(refr) reduce the nesting level in lv_refr_area
|
||||
- fix(txt) enhance the function of break_chars (#2327)
|
||||
- fix(pxp): update RTOS macro for SDK 2.10
|
||||
- fix(vglite): update for v8
|
||||
- fix(pxp): update for v8
|
||||
- fix(flex) fix layout update and invalidation issues
|
||||
- fix(flex) fix NULL pointer dereference
|
||||
- fix(obj, switch) do not send LV_EVENT_VALUE_CHANGED twice
|
||||
- fix(color) overflow with 16-bit color depth
|
||||
- fix(coords) fix using large coordinates
|
||||
- fix(chart) fix crash if no series are added
|
||||
- fix(chart) invalidation with LV_CHART_UPDATE_MODE_SHIFT
|
||||
- fix(align) fix lv_obj_align_to G
|
||||
- fix(table) invalidate the table on cell value change
|
||||
- fix(label) remove duplicated lv_obj_refresh_self_size
|
||||
- fix(draw) underflow in subpixel font drawing
|
||||
- fix (scroll) do not send unnecessary scroll end events
|
||||
- fix(table) invalidate the table on cell value change
|
||||
- fix(label) remove duplicated lv_obj_refresh_self_size
|
||||
- fix(draw) underflow in subpixel font drawing
|
||||
- fix (scroll) do not send unnecessary scroll end events
|
||||
|
||||
|
||||
## v8.0.1 (14.06.2021)
|
||||
- docs(filesystem) update to v8 <a href="https://github.com/lvgl/lvgl/commit/7971ade4">7971ade4</a>
|
||||
- fix(msgbox) create modals on top layer instead of act screen <a href="https://github.com/lvgl/lvgl/commit/5cf6303e">5cf6303e</a>
|
||||
- fix(colorwheel) disable LV_OBJ_FLAG_SCROLL_CHAIN by default <a href="https://github.com/lvgl/lvgl/commit/48d1c292">48d1c292</a>
|
||||
- docs(grid) typo fix (#2310) <a href="https://github.com/lvgl/lvgl/commit/69d109d2">69d109d2</a>
|
||||
- fix(arduino) fix the prototype of my_touchpad_read in the LVGL_Arduino.ino <a href="https://github.com/lvgl/lvgl/commit/1a62f7a6">1a62f7a6</a>
|
||||
- fix(meter) fix needle image invalidation <a href="https://github.com/lvgl/lvgl/commit/54d8e817">54d8e817</a>
|
||||
- fix(mem) add lv_ prefix to tlsf functions and types <a href="https://github.com/lvgl/lvgl/commit/0d52b59c">0d52b59c</a>
|
||||
- fix(calendar) fix the position calculation today <a href="https://github.com/lvgl/lvgl/commit/ad05e196">ad05e196</a>
|
||||
- fix(typo) rename LV_OBJ_FLAG_SNAPABLE to LV_OBJ_FLAG_SNAPPABLE <a href="https://github.com/lvgl/lvgl/commit/e697807c">e697807c</a>
|
||||
- docs(color) language fixes (#2302) <a href="https://github.com/lvgl/lvgl/commit/07ecc9f1">07ecc9f1</a>
|
||||
- fix(tick) minor optimization on lv_tick_inc call test <a href="https://github.com/lvgl/lvgl/commit/b4305df5">b4305df5</a>
|
||||
- Spelling and other language fixes to documentation (#2293) <a href="https://github.com/lvgl/lvgl/commit/d0aaacaf">d0aaacaf</a>
|
||||
- fix(theme) show disabled state on buttons of btnmatrix, msgbox and keyboard <a href="https://github.com/lvgl/lvgl/commit/0be582b3">0be582b3</a>
|
||||
- fix(scroll) keep the scroll position on object deleted <a href="https://github.com/lvgl/lvgl/commit/52edbb46">52edbb46</a>
|
||||
- fix(msgbox) handle NULL btn map parameter <a href="https://github.com/lvgl/lvgl/commit/769c4a30">769c4a30</a>
|
||||
- fix(group) allow refocusing objects <a href="https://github.com/lvgl/lvgl/commit/1520208b">1520208b</a>
|
||||
- docs(overview) spelling fixes <a href="https://github.com/lvgl/lvgl/commit/d2efb8c6">d2efb8c6</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/45960838">45960838</a>
|
||||
- feat(timer) check if lv_tick_inc is called <a href="https://github.com/lvgl/lvgl/commit/aa6641a6">aa6641a6</a>
|
||||
- feat(docs) add view on GitHub link <a href="https://github.com/lvgl/lvgl/commit/a716ac6e">a716ac6e</a>
|
||||
- fix(theme) fix the switch style in the default theme <a href="https://github.com/lvgl/lvgl/commit/0c0dc8ea">0c0dc8ea</a>
|
||||
- docs fix typo <a href="https://github.com/lvgl/lvgl/commit/8ab80645">8ab80645</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/e796448f">e796448f</a>
|
||||
- feat(event) pass the scroll animation to LV_EVENT_SCROLL_BEGIN <a href="https://github.com/lvgl/lvgl/commit/ca54ecfe">ca54ecfe</a>
|
||||
- fix(tabview) fix with left and right tabs <a href="https://github.com/lvgl/lvgl/commit/17c57449">17c57449</a>
|
||||
- chore(docs) force docs rebuild <a href="https://github.com/lvgl/lvgl/commit/4a0f4139">4a0f4139</a>
|
||||
- chore(docs) always deploy master to docs/master as well <a href="https://github.com/lvgl/lvgl/commit/6d05692d">6d05692d</a>
|
||||
- fix(template) update lv_objx_template to v8 <a href="https://github.com/lvgl/lvgl/commit/38bb8afc">38bb8afc</a>
|
||||
- docs(extra) add extra/README.md <a href="https://github.com/lvgl/lvgl/commit/8cd504d5">8cd504d5</a>
|
||||
- Update CHANGELOG.md <a href="https://github.com/lvgl/lvgl/commit/48fd73d2">48fd73d2</a>
|
||||
- Update quick-overview.md (#2295) <a href="https://github.com/lvgl/lvgl/commit/5616471c">5616471c</a>
|
||||
- fix(pxp) change LV_COLOR_TRANSP to LV_COLOR_CHROMA_KEY to v8 compatibility <a href="https://github.com/lvgl/lvgl/commit/81f3068d">81f3068d</a>
|
||||
- adding micropython examples (#2286) <a href="https://github.com/lvgl/lvgl/commit/c60ed68e">c60ed68e</a>
|
||||
- docs(color) minor fix <a href="https://github.com/lvgl/lvgl/commit/ac8f4534">ac8f4534</a>
|
||||
- fix(example) revert test code <a href="https://github.com/lvgl/lvgl/commit/77e2c1ff">77e2c1ff</a>
|
||||
- fix(draw) with additive blending with 32-bit color depth <a href="https://github.com/lvgl/lvgl/commit/786db2af">786db2af</a>
|
||||
- docs(color) update colors' docs <a href="https://github.com/lvgl/lvgl/commit/9056b5ee">9056b5ee</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/a711a1dd">a711a1dd</a>
|
||||
- perf(refresh) optimize where to wait for lv_disp_flush_ready with 2 buffers <a href="https://github.com/lvgl/lvgl/commit/d0172f14">d0172f14</a>
|
||||
- docs(lv_obj_style) update add_style and remove_style function headers (#2287) <a href="https://github.com/lvgl/lvgl/commit/60f7bcbf">60f7bcbf</a>
|
||||
- fix memory leak of spangroup (#2285) <a href="https://github.com/lvgl/lvgl/commit/33e0926a">33e0926a</a>
|
||||
- fix make lv_img_cache.h public because cache invalidation is public <a href="https://github.com/lvgl/lvgl/commit/38ebcd81">38ebcd81</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/2b292495">2b292495</a>
|
||||
- fix(btnmatrix) fix focus event handling <a href="https://github.com/lvgl/lvgl/commit/3b58ef14">3b58ef14</a>
|
||||
- Merge pull request #2280 from lvgl/dependabot/pip/docs/urllib3-1.26.5 <a href="https://github.com/lvgl/lvgl/commit/a2f45b26">a2f45b26</a>
|
||||
- fix(label) calculating the clip area <a href="https://github.com/lvgl/lvgl/commit/57e211cc">57e211cc</a>
|
||||
- chore(deps): bump urllib3 from 1.26.4 to 1.26.5 in /docs <a href="https://github.com/lvgl/lvgl/commit/b2f77dfc">b2f77dfc</a>
|
||||
- fix(docs) add docs about the default group <a href="https://github.com/lvgl/lvgl/commit/29bfe604">29bfe604</a>
|
||||
- docs(filesystem) update to v8 <a href="https://github.com/lvgl/lvgl/commit/7971ade4">7971ade4</a>
|
||||
- fix(msgbox) create modals on top layer instead of act screen <a href="https://github.com/lvgl/lvgl/commit/5cf6303e">5cf6303e</a>
|
||||
- fix(colorwheel) disable LV_OBJ_FLAG_SCROLL_CHAIN by default <a href="https://github.com/lvgl/lvgl/commit/48d1c292">48d1c292</a>
|
||||
- docs(grid) typo fix (#2310) <a href="https://github.com/lvgl/lvgl/commit/69d109d2">69d109d2</a>
|
||||
- fix(arduino) fix the prototype of my_touchpad_read in the LVGL_Arduino.ino <a href="https://github.com/lvgl/lvgl/commit/1a62f7a6">1a62f7a6</a>
|
||||
- fix(meter) fix needle image invalidation <a href="https://github.com/lvgl/lvgl/commit/54d8e817">54d8e817</a>
|
||||
- fix(mem) add lv_ prefix to tlsf functions and types <a href="https://github.com/lvgl/lvgl/commit/0d52b59c">0d52b59c</a>
|
||||
- fix(calendar) fix the position calculation today <a href="https://github.com/lvgl/lvgl/commit/ad05e196">ad05e196</a>
|
||||
- fix(typo) rename LV_OBJ_FLAG_SNAPABLE to LV_OBJ_FLAG_SNAPPABLE <a href="https://github.com/lvgl/lvgl/commit/e697807c">e697807c</a>
|
||||
- docs(color) language fixes (#2302) <a href="https://github.com/lvgl/lvgl/commit/07ecc9f1">07ecc9f1</a>
|
||||
- fix(tick) minor optimization on lv_tick_inc call test <a href="https://github.com/lvgl/lvgl/commit/b4305df5">b4305df5</a>
|
||||
- Spelling and other language fixes to documentation (#2293) <a href="https://github.com/lvgl/lvgl/commit/d0aaacaf">d0aaacaf</a>
|
||||
- fix(theme) show disabled state on buttons of btnmatrix, msgbox and keyboard <a href="https://github.com/lvgl/lvgl/commit/0be582b3">0be582b3</a>
|
||||
- fix(scroll) keep the scroll position on object deleted <a href="https://github.com/lvgl/lvgl/commit/52edbb46">52edbb46</a>
|
||||
- fix(msgbox) handle NULL btn map parameter <a href="https://github.com/lvgl/lvgl/commit/769c4a30">769c4a30</a>
|
||||
- fix(group) allow refocusing objects <a href="https://github.com/lvgl/lvgl/commit/1520208b">1520208b</a>
|
||||
- docs(overview) spelling fixes <a href="https://github.com/lvgl/lvgl/commit/d2efb8c6">d2efb8c6</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/45960838">45960838</a>
|
||||
- feat(timer) check if lv_tick_inc is called <a href="https://github.com/lvgl/lvgl/commit/aa6641a6">aa6641a6</a>
|
||||
- feat(docs) add view on GitHub link <a href="https://github.com/lvgl/lvgl/commit/a716ac6e">a716ac6e</a>
|
||||
- fix(theme) fix the switch style in the default theme <a href="https://github.com/lvgl/lvgl/commit/0c0dc8ea">0c0dc8ea</a>
|
||||
- docs fix typo <a href="https://github.com/lvgl/lvgl/commit/8ab80645">8ab80645</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/e796448f">e796448f</a>
|
||||
- feat(event) pass the scroll animation to LV_EVENT_SCROLL_BEGIN <a href="https://github.com/lvgl/lvgl/commit/ca54ecfe">ca54ecfe</a>
|
||||
- fix(tabview) fix with left and right tabs <a href="https://github.com/lvgl/lvgl/commit/17c57449">17c57449</a>
|
||||
- chore(docs) force docs rebuild <a href="https://github.com/lvgl/lvgl/commit/4a0f4139">4a0f4139</a>
|
||||
- chore(docs) always deploy master to docs/master as well <a href="https://github.com/lvgl/lvgl/commit/6d05692d">6d05692d</a>
|
||||
- fix(template) update lv_objx_template to v8 <a href="https://github.com/lvgl/lvgl/commit/38bb8afc">38bb8afc</a>
|
||||
- docs(extra) add extra/README.md <a href="https://github.com/lvgl/lvgl/commit/8cd504d5">8cd504d5</a>
|
||||
- Update CHANGELOG.md <a href="https://github.com/lvgl/lvgl/commit/48fd73d2">48fd73d2</a>
|
||||
- Update quick-overview.md (#2295) <a href="https://github.com/lvgl/lvgl/commit/5616471c">5616471c</a>
|
||||
- fix(pxp) change LV_COLOR_TRANSP to LV_COLOR_CHROMA_KEY to v8 compatibility <a href="https://github.com/lvgl/lvgl/commit/81f3068d">81f3068d</a>
|
||||
- adding micropython examples (#2286) <a href="https://github.com/lvgl/lvgl/commit/c60ed68e">c60ed68e</a>
|
||||
- docs(color) minor fix <a href="https://github.com/lvgl/lvgl/commit/ac8f4534">ac8f4534</a>
|
||||
- fix(example) revert test code <a href="https://github.com/lvgl/lvgl/commit/77e2c1ff">77e2c1ff</a>
|
||||
- fix(draw) with additive blending with 32-bit color depth <a href="https://github.com/lvgl/lvgl/commit/786db2af">786db2af</a>
|
||||
- docs(color) update colors' docs <a href="https://github.com/lvgl/lvgl/commit/9056b5ee">9056b5ee</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/a711a1dd">a711a1dd</a>
|
||||
- perf(refresh) optimize where to wait for lv_disp_flush_ready with 2 buffers <a href="https://github.com/lvgl/lvgl/commit/d0172f14">d0172f14</a>
|
||||
- docs(lv_obj_style) update add_style and remove_style function headers (#2287) <a href="https://github.com/lvgl/lvgl/commit/60f7bcbf">60f7bcbf</a>
|
||||
- fix memory leak of spangroup (#2285) <a href="https://github.com/lvgl/lvgl/commit/33e0926a">33e0926a</a>
|
||||
- fix make lv_img_cache.h public because cache invalidation is public <a href="https://github.com/lvgl/lvgl/commit/38ebcd81">38ebcd81</a>
|
||||
- Merge branch 'master' of https://github.com/lvgl/lvgl <a href="https://github.com/lvgl/lvgl/commit/2b292495">2b292495</a>
|
||||
- fix(btnmatrix) fix focus event handling <a href="https://github.com/lvgl/lvgl/commit/3b58ef14">3b58ef14</a>
|
||||
- Merge pull request #2280 from lvgl/dependabot/pip/docs/urllib3-1.26.5 <a href="https://github.com/lvgl/lvgl/commit/a2f45b26">a2f45b26</a>
|
||||
- fix(label) calculating the clip area <a href="https://github.com/lvgl/lvgl/commit/57e211cc">57e211cc</a>
|
||||
- chore(deps): bump urllib3 from 1.26.4 to 1.26.5 in /docs <a href="https://github.com/lvgl/lvgl/commit/b2f77dfc">b2f77dfc</a>
|
||||
- fix(docs) add docs about the default group <a href="https://github.com/lvgl/lvgl/commit/29bfe604">29bfe604</a>
|
||||
|
||||
## v8.0.0 (01.06.2021)
|
||||
|
||||
v8.0 brings many new features like simplified and more powerful scrolling, new layouts inspired by CSS Flexbox and Grid, simplified and improved widgets, more powerful events, hookable drawing, and more.
|
||||
|
||||
v8 is a major change and therefore it's not backward compatible with v7.
|
||||
v8 is a major change and therefore it's not backward compatible with v7.
|
||||
|
||||
### Directory structure
|
||||
- The `lv_` prefix is removed from the folder names
|
||||
@@ -1026,7 +1026,7 @@ v8 is a major change and therefore it's not backward compatible with v7.
|
||||
- `lv_disp_drv_t`, `lv_indev_drv_t`, `lv_fs_drv_t` needs to be `static`
|
||||
- `...disp_buf...` is renamed to `draw_buf`. See an initialization example [here](https://github.com/lvgl/lv_sim_eclipse_sdl/blob/release/v8.0/main.c#L128-L141).
|
||||
- No partial update if two screen sized buffers are set
|
||||
- `disp_drv->full_refresh = 1` makes always the whole display redraw.
|
||||
- `disp_drv->full_refresh = 1` makes always the whole display redraw.
|
||||
- `hor_res` and `ver_res` need to be set in `disp_drv`
|
||||
- `indev_read_cb` returns `void`. To indicate that there is more that to read set `data->continue_reading = 1` in the `read_cb`
|
||||
|
||||
@@ -1055,7 +1055,7 @@ v8 is a major change and therefore it's not backward compatible with v7.
|
||||
- Use the new layouts instead of `lv_cont` features
|
||||
- Use `lv_obj` instead of `lv_page`
|
||||
- See the changes in [Colors](https://docs.lvgl.io/8.0/overview/color.html)
|
||||
- The other parts are mainly minor renames and refactoring. See the functions' documentation for descriptions.
|
||||
- The other parts are mainly minor renames and refactoring. See the functions' documentation for descriptions.
|
||||
|
||||
## v7.11.0 (16.03.2021)
|
||||
|
||||
@@ -1069,7 +1069,7 @@ v8 is a major change and therefore it's not backward compatible with v7.
|
||||
|
||||
## v7.10.1 (16.02.2021)
|
||||
|
||||
### Bugfixes
|
||||
### Bugfixes
|
||||
- fix(draw) overlap outline with background to prevent aliasing artifacts
|
||||
- fix(indev) clear the indev's `act_obj` in `lv_indev_reset`
|
||||
- fix(text) fix out of bounds read in `_lv_txt_get_width`
|
||||
@@ -1127,7 +1127,7 @@ v8 is a major change and therefore it's not backward compatible with v7.
|
||||
## v7.8.0 (01.12.2020)
|
||||
|
||||
### New features
|
||||
- make DMA2D non blocking
|
||||
- make DMA2D non blocking
|
||||
- add unscii-16 built-in font
|
||||
- add KConfig
|
||||
- add lv_refr_get_fps_avg()
|
||||
@@ -1144,7 +1144,7 @@ v8 is a major change and therefore it's not backward compatible with v7.
|
||||
- fix(slider) adjusting the left knob too with encoder
|
||||
- fix reference to LV_DRAW_BUF_MAX_NUM in lv_mem.c
|
||||
- fix(polygon draw) join adjacent points if they are on the same coordinate
|
||||
- fix(linemeter) fix invalidation when setting new value
|
||||
- fix(linemeter) fix invalidation when setting new value
|
||||
- fix(table) add missing invalidation when changing cell type
|
||||
- refactor(roller) rename LV_ROLLER_MODE_INIFINITE -> LV_ROLLER_MODE_INFINITE
|
||||
|
||||
@@ -1156,7 +1156,7 @@ v8 is a major change and therefore it's not backward compatible with v7.
|
||||
- label: Repair calculate back `dot` character logical error which cause infinite loop.
|
||||
- fix(theme_material): remove the bottom border from tabview header
|
||||
- fix(imgbtn) guess the closest available state with valid src
|
||||
- fix(spinbox) update cursor position in lv_spinbox_set_step
|
||||
- fix(spinbox) update cursor position in lv_spinbox_set_step
|
||||
|
||||
## v7.7.1 (03.11.2020)
|
||||
### Bugfixes
|
||||
@@ -1201,7 +1201,7 @@ v8 is a major change and therefore it's not backward compatible with v7.
|
||||
- Check whether any style property has changed on a state change to decide if any redraw is required
|
||||
|
||||
### Bugfixes
|
||||
- Fix selection of options with non-ASCII letters in dropdown list
|
||||
- Fix selection of options with non-ASCII letters in dropdown list
|
||||
- Fix font loader to support LV_FONT_FMT_TXT_LARGE
|
||||
|
||||
## v7.5.0 (15.09.2020)
|
||||
@@ -1248,7 +1248,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k
|
||||
- Rename `lv_chart_clear_serie` to `lv_chart_clear_series` and `lv_obj_align_origo` to `lv_obj_align_mid`
|
||||
- Add linemeter's mirror feature again
|
||||
- Fix text decor (underline strikethrough) with older versions of font converter
|
||||
- Fix setting local style property multiple times
|
||||
- Fix setting local style property multiple times
|
||||
- Add missing background drawing and radius handling to image button
|
||||
- Allow adding extra label to list buttons
|
||||
- Fix crash if `lv_table_set_col_cnt` is called before `lv_table_set_row_cnt` for the first time
|
||||
@@ -1300,7 +1300,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k
|
||||
|
||||
### Bugfixes
|
||||
- `tileview` fix navigation when not screen sized
|
||||
- Use 14px font by default to for better compatibility with smaller displays
|
||||
- Use 14px font by default to for better compatibility with smaller displays
|
||||
- `linemeter` fix conversation of current value to "level"
|
||||
- Fix drawing on right border
|
||||
- Set the cursor image non-clickable by default
|
||||
@@ -1357,7 +1357,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k
|
||||
|
||||
### Bugfixes
|
||||
- Make Micropython working by adding the required variables as GC_ROOT
|
||||
- Prefix some internal API functions with `_` to reduce the API of LVGL
|
||||
- Prefix some internal API functions with `_` to reduce the API of LVGL
|
||||
- Fix built-in SimSun CJK font
|
||||
- Fix UTF-8 encoding when `LV_USE_ARABIC_PERSIAN_CHARS` is enabled
|
||||
- Fix DMA2D usage when 32 bit images directly blended
|
||||
@@ -1382,12 +1382,12 @@ The name of the project is changed to LVGL and the new website is on https://lvg
|
||||
LVGL remains free under the same conditions (MIT license) and a company is created to manage LVGL and offer services.
|
||||
|
||||
### New drawing system
|
||||
Complete rework of LVGL's draw engine to use "masks" for more advanced and higher quality graphical effects.
|
||||
Complete rework of LVGL's draw engine to use "masks" for more advanced and higher quality graphical effects.
|
||||
A possible use-case of this system is to remove the overflowing content from the rounded edges.
|
||||
It also allows drawing perfectly anti-aliased circles, lines, and arcs.
|
||||
Internally, the drawings happen by defining masks (such as rounded rectangle, line, angle).
|
||||
When something is drawn the currently active masks can make some pixels transparent.
|
||||
For example, rectangle borders are drawn by using 2 rectangle masks: one mask removes the inner part and another the outer part.
|
||||
Internally, the drawings happen by defining masks (such as rounded rectangle, line, angle).
|
||||
When something is drawn the currently active masks can make some pixels transparent.
|
||||
For example, rectangle borders are drawn by using 2 rectangle masks: one mask removes the inner part and another the outer part.
|
||||
|
||||
The API in this regard remained the same but some new functions were added:
|
||||
- `lv_img_set_zoom`: set image object's zoom factor
|
||||
@@ -1397,12 +1397,12 @@ The API in this regard remained the same but some new functions were added:
|
||||
The new drawing engine brought new drawing features too. They are highlighted in the "style" section.
|
||||
|
||||
### New style system
|
||||
The old style system is replaced with a new more flexible and lightweighted one.
|
||||
It uses an approach similar to CSS: support cascading styles, inheriting properties and local style properties per object.
|
||||
As part of these updates, a lot of objects were reworked and the APIs have been changed.
|
||||
The old style system is replaced with a new more flexible and lightweighted one.
|
||||
It uses an approach similar to CSS: support cascading styles, inheriting properties and local style properties per object.
|
||||
As part of these updates, a lot of objects were reworked and the APIs have been changed.
|
||||
|
||||
- more shadows options: *offset* and *spread*
|
||||
- gradient stop position to shift the gradient area and horizontal gradient
|
||||
- gradient stop position to shift the gradient area and horizontal gradient
|
||||
- `LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE` blending modes
|
||||
- *clip corner*: crop the content on the rounded corners
|
||||
- *text underline* and *strikethrough*
|
||||
@@ -1446,16 +1446,16 @@ The following object types are renamed:
|
||||
- `linemeter`, `gauge`: can have background if the related style properties are set. Padding makes the scale/lines smaller. scale_border_width and scale_end_border_width allow to draw an arc on the outer part of the scale lines.
|
||||
- `gauge`: `lv_gauge_set_needle_img` allows use image as needle
|
||||
- `canvas`: allow drawing to true color alpha and alpha only canvas, add `lv_canvas_blur_hor/ver` and rename `lv_canvas_rotate` to `lv_canvas_transform`
|
||||
- `textarea`: If available in the font use bullet (`U+2022`) character in text area password
|
||||
- `textarea`: If available in the font use bullet (`U+2022`) character in text area password
|
||||
|
||||
### New object types
|
||||
- `lv_objmask`: masks can be added to it. The children will be masked accordingly.
|
||||
- `lv_objmask`: masks can be added to it. The children will be masked accordingly.
|
||||
|
||||
### Others
|
||||
- Change the built-in fonts to [Montserrat](https://fonts.google.com/specimen/Montserrat) and add built-in fonts from 12 px to 48 px for every 2nd size.
|
||||
- Add example CJK and Arabic/Persian/Hebrew built-in font
|
||||
- Add ° and "bullet" to the built-in fonts
|
||||
- Add Arabic/Persian script support: change the character according to its position in the text.
|
||||
- Add Arabic/Persian script support: change the character according to its position in the text.
|
||||
- Add `playback_time` to animations.
|
||||
- Add `repeat_count` to animations instead of the current "repeat forever".
|
||||
- Replace `LV_LAYOUT_PRETTY` with `LV_LAYOUT_PRETTY_TOP/MID/BOTTOM`
|
||||
@@ -1472,4 +1472,4 @@ The following object types are renamed:
|
||||
- First and foremost, create a new `lv_conf.h` based on `lv_conf_template.h`.
|
||||
- To try the new version it suggested using a simulator project and see the examples.
|
||||
- If you have a running project, the most difficult part of the migration is updating to the new style system. Unfortunately, there is no better way than manually updating to the new format.
|
||||
- The other parts are mainly minor renames and refactoring as described above.
|
||||
- The other parts are mainly minor renames and refactoring as described above.
|
||||
|
||||
+44
-44
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/CONTRIBUTING.md
|
||||
```
|
||||
|
||||
@@ -9,22 +9,22 @@
|
||||
|
||||
Join LVGL's community and leave your footprint in the library!
|
||||
|
||||
There are a lot of ways to contribute to LVGL even if you are new to the library or even new to programming.
|
||||
There are a lot of ways to contribute to LVGL even if you are new to the library or even new to programming.
|
||||
|
||||
It might be scary to make the first step but you have nothing to be afraid of.
|
||||
It might be scary to make the first step but you have nothing to be afraid of.
|
||||
A friendly and helpful community is waiting for you. Get to know like-minded people and make something great together.
|
||||
|
||||
So let's find which contribution option fits you the best and help you join the development of LVGL!
|
||||
|
||||
Before getting started here are some guidelines to make contribution smoother:
|
||||
- Be kind and friendly.
|
||||
- Be kind and friendly.
|
||||
- Be sure to read the relevant part of the documentation before posting a question.
|
||||
- Ask questions in the [Forum](https://forum.lvgl.io/) and use [GitHub](https://github.com/lvgl/) for development-related discussions.
|
||||
- Always fill out the post or issue templates in the Forum or GitHub (or at least provide equivalent information). It makes understanding your contribution or issue easier and you will get a useful response faster.
|
||||
- If possible send an absolute minimal but buildable code example in order to reproduce the issue. Be sure it contains all the required variable declarations, constants, and assets (images, fonts).
|
||||
- Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your posts. You can learn it in 10 minutes.
|
||||
- Speak about one thing in one issue or topic. It makes your post easier to find later for someone with the same question.
|
||||
- Give feedback and close the issue or mark the topic as solved if your question is answered.
|
||||
- Give feedback and close the issue or mark the topic as solved if your question is answered.
|
||||
- For non-trivial fixes and features, it's better to open an issue first to discuss the details instead of sending a pull request directly.
|
||||
- Please read and follow the <a href="https://github.com/lvgl/lvgl/blob/master/docs/CODING_STYLE.md">Coding style</a> guide.
|
||||
|
||||
@@ -32,7 +32,7 @@ Before getting started here are some guidelines to make contribution smoother:
|
||||
|
||||
Merging new code into the lvgl, documentation, blog, examples, and other repositories happen via *Pull requests* (PR for short).
|
||||
A PR is a notification like "Hey, I made some updates to your project. Here are the changes, you can add them if you want."
|
||||
To do this you need a copy (called fork) of the original project under your account, make some changes there, and notify the original repository about your updates.
|
||||
To do this you need a copy (called fork) of the original project under your account, make some changes there, and notify the original repository about your updates.
|
||||
You can see what it looks like on GitHub for LVGL here: [https://github.com/lvgl/lvgl/pulls](https://github.com/lvgl/lvgl/pulls).
|
||||
|
||||
To add your changes you can edit files online on GitHub and send a new Pull request from there (recommended for small changes) or
|
||||
@@ -48,13 +48,13 @@ To add your changes you can edit files online on GitHub and send a new Pull requ
|
||||
### From command line
|
||||
|
||||
The instructions describe the main `lvgl` repository but it works the same way for the other repositories.
|
||||
1. Fork the [lvgl repository](https://github.com/lvgl/lvgl). To do this click the "Fork" button in the top right corner.
|
||||
1. Fork the [lvgl repository](https://github.com/lvgl/lvgl). To do this click the "Fork" button in the top right corner.
|
||||
It will "copy" the `lvgl` repository to your GitHub account (`https://github.com/<YOUR_NAME>?tab=repositories`)
|
||||
2. Clone your forked repository.
|
||||
3. Add your changes. You can create a *feature branch* from *master* for the updates: `git checkout -b the-new-feature`
|
||||
3. Add your changes. You can create a *feature branch* from *master* for the updates: `git checkout -b the-new-feature`
|
||||
4. Commit and push your changes to the forked `lvgl` repository.
|
||||
5. Create a PR on GitHub from the page of your `lvgl` repository (`https://github.com/<YOUR_NAME>/lvgl`) by clicking the *"New pull request"* button. Don't forget to select the branch where you added your changes.
|
||||
7. Set the base branch. It means where you want to merge your update. In the `lvgl` repo both the fixes and new features go to `master` branch.
|
||||
7. Set the base branch. It means where you want to merge your update. In the `lvgl` repo both the fixes and new features go to `master` branch.
|
||||
8. Describe what is in the update. An example code is welcome if applicable.
|
||||
9. If you need to make more changes, just update your forked `lvgl` repo with new commits. They will automatically appear in the PR.
|
||||
|
||||
@@ -72,7 +72,7 @@ The following structure should be used:
|
||||
|
||||
Possible `<type>`s:
|
||||
- `fix` bugfix in the source code.
|
||||
- `feat` new feature
|
||||
- `feat` new feature
|
||||
- `arch` architectural changes
|
||||
- `perf` changes that affect the performance
|
||||
- `example` anything related to examples (even fixes and new examples)
|
||||
@@ -91,8 +91,8 @@ For example `img`, `layout`, `txt`, `anim`. The scope can be omitted.
|
||||
|
||||
`<body>` optional and can be used to describe the details of this change.
|
||||
|
||||
`<footer>` shall contain
|
||||
- the words "BREAKING CHANGE" if the changes break the API
|
||||
`<footer>` shall contain
|
||||
- the words "BREAKING CHANGE" if the changes break the API
|
||||
- reference to the GitHub issue or Pull Request if applicable.
|
||||
|
||||
Some examples:
|
||||
@@ -137,7 +137,7 @@ To make the DCO easier to digest, here are some practical guides about specific
|
||||
|
||||
#### Your own work
|
||||
|
||||
The simplest case is when the contribution is solely your own work.
|
||||
The simplest case is when the contribution is solely your own work.
|
||||
In this case you can just send a Pull Request without worrying about any licensing issues.
|
||||
|
||||
#### Use code from online source
|
||||
@@ -161,14 +161,14 @@ As LVGL is MIT licensed, other MIT licensed code can be integrated without issue
|
||||
The MIT license requires a copyright notice be added to the derived work. Any derivative work based on MIT licensed code must copy the original work's license file or text.
|
||||
|
||||
#### Use GPL licensed code
|
||||
The GPL license is not compatible with the MIT license. Therefore, LVGL can not accept GPL licensed code.
|
||||
|
||||
The GPL license is not compatible with the MIT license. Therefore, LVGL can not accept GPL licensed code.
|
||||
|
||||
## Ways to contribute
|
||||
|
||||
Even if you're just getting started with LVGL there are plenty of ways to get your feet wet.
|
||||
Most of these options don't even require knowing a single line of LVGL code.
|
||||
Even if you're just getting started with LVGL there are plenty of ways to get your feet wet.
|
||||
Most of these options don't even require knowing a single line of LVGL code.
|
||||
|
||||
Below we have collected some opportunities about the ways you can contribute to LVGL.
|
||||
Below we have collected some opportunities about the ways you can contribute to LVGL.
|
||||
|
||||
### Give LVGL a Star
|
||||
|
||||
@@ -178,36 +178,36 @@ Show that you like LVGL by giving it star on GitHub!
|
||||
<!-- Place this tag where you want the button to render. -->
|
||||
<a class="github-button" href="https://github.com/lvgl/lvgl" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star lvgl/lvgl on GitHub">Star</a>
|
||||
|
||||
This simple click makes LVGL more visible on GitHub and makes it more attractive to other people.
|
||||
So with this, you already helped a lot!
|
||||
This simple click makes LVGL more visible on GitHub and makes it more attractive to other people.
|
||||
So with this, you already helped a lot!
|
||||
|
||||
### Tell what you have achieved
|
||||
|
||||
Have you already started using LVGL in a [Simulator](/get-started/platforms/pc-simulator), a development board, or on your custom hardware?
|
||||
Was it easy or were there some obstacles? Are you happy with the result?
|
||||
Have you already started using LVGL in a [Simulator](/get-started/platforms/pc-simulator), a development board, or on your custom hardware?
|
||||
Was it easy or were there some obstacles? Are you happy with the result?
|
||||
Showing your project to others is a win-win situation because it increases your and LVGL's reputation at the same time.
|
||||
|
||||
You can post about your project on Twitter, Facebook, LinkedIn, create a YouTube video, and so on.
|
||||
Only one thing: On social media don't forget to add a link to `https://lvgl.io` or `https://github.com/lvgl` and use the hashtag `#lvgl`. Thank you! :)
|
||||
You can post about your project on Twitter, Facebook, LinkedIn, create a YouTube video, and so on.
|
||||
Only one thing: On social media don't forget to add a link to `https://lvgl.io` or `https://github.com/lvgl` and use the hashtag `#lvgl`. Thank you! :)
|
||||
|
||||
You can also open a new topic in the [My projects](https://forum.lvgl.io/c/my-projects/10) category of the Forum.
|
||||
|
||||
The [LVGL Blog](https://blog.lvgl.io) welcomes posts from anyone.
|
||||
The [LVGL Blog](https://blog.lvgl.io) welcomes posts from anyone.
|
||||
It's a good place to talk about a project you created with LVGL, write a tutorial, or share some nice tricks.
|
||||
The latest blog posts are shown on the [homepage of LVGL](https://lvgl.io) to make your work more visible.
|
||||
|
||||
The blog is hosted on GitHub. If you add a post GitHub automatically turns it into a website.
|
||||
The blog is hosted on GitHub. If you add a post GitHub automatically turns it into a website.
|
||||
See the [README](https://github.com/lvgl/blog) of the blog repo to see how to add your post.
|
||||
|
||||
|
||||
Any of these help to spread the word and familiarize new developers with LVGL.
|
||||
|
||||
If you don't want to speak about your project publicly, feel free to use [Contact form](https://lvgl.io/#contact) on lvgl.io to private message to us.
|
||||
If you don't want to speak about your project publicly, feel free to use [Contact form](https://lvgl.io/#contact) on lvgl.io to private message to us.
|
||||
|
||||
### Write examples
|
||||
As you learn LVGL you will probably play with the features of widgets. Why not publish your experiments?
|
||||
|
||||
Each widgets' documentation contains examples. For instance, here are the examples of the [Drop-down list](/widgets/core/dropdown#examples) widget.
|
||||
The examples are directly loaded from the [lvgl/examples](https://github.com/lvgl/lvgl/tree/master/examples) folder.
|
||||
Each widgets' documentation contains examples. For instance, here are the examples of the [Drop-down list](/widgets/core/dropdown#examples) widget.
|
||||
The examples are directly loaded from the [lvgl/examples](https://github.com/lvgl/lvgl/tree/master/examples) folder.
|
||||
|
||||
So all you need to do is send a [Pull request](#pull-request) to the [lvgl](https://github.com/lvgl/lvgl) repository and follow some conventions:
|
||||
- Name the examples like `lv_example_<widget_name>_<index>`.
|
||||
@@ -219,14 +219,14 @@ So all you need to do is send a [Pull request](#pull-request) to the [lvgl](http
|
||||
### Improve the docs
|
||||
|
||||
As you read the documentation you might see some typos or unclear sentences. All the documentation is located in the [lvgl/docs](https://github.com/lvgl/lvgl/tree/master/docs) folder.
|
||||
For typos and straightforward fixes, you can simply edit the file on GitHub.
|
||||
For typos and straightforward fixes, you can simply edit the file on GitHub.
|
||||
|
||||
Note that the documentation is also formatted in [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
|
||||
Note that the documentation is also formatted in [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
|
||||
|
||||
### Report bugs
|
||||
As you use LVGL you might find bugs. Before reporting them be sure to check the relevant parts of the documentation.
|
||||
|
||||
If it really seems like a bug feel free to open an [issue on GitHub](https://github.com/lvgl/lvgl/issues).
|
||||
If it really seems like a bug feel free to open an [issue on GitHub](https://github.com/lvgl/lvgl/issues).
|
||||
|
||||
When filing the issue be sure to fill out the template. It helps find the root of the problem while avoiding extensive questions and exchanges with other developers.
|
||||
|
||||
@@ -249,17 +249,17 @@ Just read the titles and if you are familiar with the topic don't hesitate to sh
|
||||
Participating in the discussions is one of the best ways to become part of the project and get to know like-minded people!
|
||||
|
||||
### Add features
|
||||
If you have created a cool widget, or added useful feature to LVGL feel free to open a new PR for it.
|
||||
We collect the optional features (a.k.a. plugins) in [lvgl/src/extra](https://github.com/lvgl/lvgl/tree/master/src/extra) folder so if you are interested in adding a new features please use this folder.
|
||||
If you have created a cool widget, or added useful feature to LVGL feel free to open a new PR for it.
|
||||
We collect the optional features (a.k.a. plugins) in [lvgl/src/extra](https://github.com/lvgl/lvgl/tree/master/src/extra) folder so if you are interested in adding a new features please use this folder.
|
||||
The [README](https://github.com/lvgl/lvgl/blob/master/src/extra/README.md) file describes the basics rules of contribution and also lists some ideas.
|
||||
|
||||
For further ideas take a look at the [Roadmap](/ROADMAP) page. If you are interested in any of them feel free to share your opinion and/or participate in the implementation.
|
||||
|
||||
Other features which are (still) not on the road map are listed in the [Feature request](https://forum.lvgl.io/c/feature-request/9) category of the Forum.
|
||||
Other features which are (still) not on the road map are listed in the [Feature request](https://forum.lvgl.io/c/feature-request/9) category of the Forum.
|
||||
|
||||
When adding a new features the followings also needs to be updated:
|
||||
- Update [lv_conf_template.h](https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h)
|
||||
- Add description in the [docs](https://github.com/lvgl/lvgl/tree/master/docs)
|
||||
- Add description in the [docs](https://github.com/lvgl/lvgl/tree/master/docs)
|
||||
- Add [examples](https://github.com/lvgl/lvgl/tree/master/examples)
|
||||
- Update the [changelog](https://github.com/lvgl/lvgl/tree/master/docs/CHANGELOG.md)
|
||||
|
||||
@@ -279,22 +279,22 @@ You can become a maintainer by invitation, however the following conditions need
|
||||
2. Send > 5 non-trivial pull requests to the repo where you would like to be a maintainer
|
||||
|
||||
|
||||
If you are interested, just send a message (e.g. from the Forum) to the current maintainers of the repository. They will check if the prerequisites are met.
|
||||
Note that meeting the prerequisites is not a guarantee of acceptance, i.e. if the conditions are met you won't automatically become a maintainer.
|
||||
If you are interested, just send a message (e.g. from the Forum) to the current maintainers of the repository. They will check if the prerequisites are met.
|
||||
Note that meeting the prerequisites is not a guarantee of acceptance, i.e. if the conditions are met you won't automatically become a maintainer.
|
||||
It's up to the current maintainers to make the decision.
|
||||
|
||||
### Move your project repository under LVGL organization
|
||||
Besides the core `lvgl` repository there are other repos for ports to development boards, IDEs or other environment.
|
||||
Besides the core `lvgl` repository there are other repos for ports to development boards, IDEs or other environment.
|
||||
If you ported LVGL to a new platform we can host it under the LVGL organization among the other repos.
|
||||
|
||||
This way your project will become part of the whole LVGL project and can get more visibility.
|
||||
If you are interested in this opportunity just open an [issue in lvgl repo](https://github.com/lvgl/lvgl/issues) and tell what you have!
|
||||
This way your project will become part of the whole LVGL project and can get more visibility.
|
||||
If you are interested in this opportunity just open an [issue in lvgl repo](https://github.com/lvgl/lvgl/issues) and tell what you have!
|
||||
|
||||
If we agree that your port fit well into the LVGL organization, we will open a repository for your project where you will have admin rights.
|
||||
If we agree that your port fit well into the LVGL organization, we will open a repository for your project where you will have admin rights.
|
||||
|
||||
To make this concept sustainable there a few rules to follow:
|
||||
- You need to add a README to your repo.
|
||||
- We expect to maintain the repo to some extent:
|
||||
- Follow at least the major versions of LVGL
|
||||
- Follow at least the major versions of LVGL
|
||||
- Respond to the issues (in a reasonable time)
|
||||
- If there is no activity in a repo for 1 year it will be archived
|
||||
|
||||
@@ -57,7 +57,7 @@ class LvExample(Directive):
|
||||
env = self.state.document.settings.env
|
||||
|
||||
iframe_html = ""
|
||||
|
||||
|
||||
c_path = self.get_example_code_path(example_path, 'c')
|
||||
py_path = self.get_example_code_path(example_path, 'py')
|
||||
|
||||
@@ -69,7 +69,7 @@ class LvExample(Directive):
|
||||
'<i class="fa fa-play"></i> Simulator': f"https://sim.lvgl.io/v{env.config.version}/micropython/ports/javascript/index.html?script_startup=https://raw.githubusercontent.com/lvgl/lvgl/{env.config.repo_commit_hash}/examples/header.py&script=https://raw.githubusercontent.com/lvgl/lvgl/{env.config.repo_commit_hash}/examples/{example_path}.py"
|
||||
})
|
||||
|
||||
if not 'c' in excluded_languages:
|
||||
if not 'c' in excluded_languages:
|
||||
if env.app.tags.has('html'):
|
||||
iframe_html = f"<div class='lv-example' data-real-src='/{env.config.version}/_static/built_lv_examples?example={example_name}&w=320&h=240'></div>"
|
||||
|
||||
|
||||
Vendored
+6
-6
@@ -7,12 +7,12 @@ td {
|
||||
text-align:center;
|
||||
}
|
||||
span.pre
|
||||
{
|
||||
{
|
||||
padding-right:8px;
|
||||
}
|
||||
|
||||
span.pre:first-child
|
||||
{
|
||||
{
|
||||
padding-right:0px;
|
||||
}
|
||||
|
||||
@@ -26,18 +26,18 @@ code.sig-name
|
||||
display: block;
|
||||
clear: both;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.toggle .header:before {
|
||||
font-family: FontAwesome, "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
content: "\f0da \00a0 Show ";
|
||||
content: "\f0da \00a0 Show ";
|
||||
display: inline-block;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.toggle .header.open:before {
|
||||
content: "\f0d7 \00a0 Hide ";
|
||||
content: "\f0d7 \00a0 Hide ";
|
||||
}
|
||||
|
||||
.header p {
|
||||
@@ -56,7 +56,7 @@ code.sig-name
|
||||
|
||||
|
||||
.home-img {
|
||||
width:32%;
|
||||
width:32%;
|
||||
transition: transform .3s ease-out;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -29,7 +29,7 @@ function add_version_selector()
|
||||
p.innerHTML = `
|
||||
<select name="versions" id="versions" onchange="ver_sel()" style="border-radius:5px; margin-bottom:15px">
|
||||
${versions.map(version => {
|
||||
let versionName = "";
|
||||
let versionName = "";
|
||||
if(version == "master") versionName = "master (latest)";
|
||||
else versionName = "v" + ((version.indexOf(".") != -1) ? version : (version + " (latest minor)"));
|
||||
return `<option value="${version}">${versionName}</option>`;
|
||||
@@ -49,7 +49,7 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
||||
var value = window.location.pathname.split('/')[1];
|
||||
document.getElementById("versions").value = value;
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
function onIntersection(entries) {
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ def cmd(s):
|
||||
print(s)
|
||||
print("-------------------------------------")
|
||||
r = os.system(s)
|
||||
if r != 0:
|
||||
if r != 0:
|
||||
print("Exit build due to previous error")
|
||||
exit(-1)
|
||||
|
||||
@@ -31,7 +31,7 @@ br = re.sub('\* ', '', br)
|
||||
ex.exec()
|
||||
|
||||
urlpath = re.sub('release/', '', br)
|
||||
|
||||
|
||||
# Be sure the GitHub links point to the right branch
|
||||
f = open("header.rst", "w")
|
||||
f.write(".. |github_link_base| replace:: https://github.com/lvgl/lvgl/blob/" + gitcommit + "/docs")
|
||||
@@ -48,7 +48,7 @@ args = sys.argv[1:]
|
||||
if len(args) >= 1:
|
||||
if "clean" in args: clean = 1
|
||||
if "skip_latex" in args: skip_latex = True
|
||||
|
||||
|
||||
lang = "en"
|
||||
print("")
|
||||
print("****************")
|
||||
|
||||
+3
-3
@@ -49,7 +49,7 @@ extensions = ['sphinx.ext.autodoc',
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The default language to highlight source code in. The default is 'python'.
|
||||
# The default language to highlight source code in. The default is 'python'.
|
||||
# The value should be a valid Pygments lexer name, see Showing code examples for more details.
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ language = None
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = ['_build', 'doxygen_html', 'Thumbs.db', '.DS_Store',
|
||||
exclude_patterns = ['_build', 'doxygen_html', 'Thumbs.db', '.DS_Store',
|
||||
'README.md', 'lv_examples', 'out_html' ]
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
@@ -164,7 +164,7 @@ latex_elements = {
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
|
||||
|
||||
'inputenc': '',
|
||||
'utf8extra': '',
|
||||
'classoptions': ',openany,oneside',
|
||||
|
||||
+11
-11
@@ -21,13 +21,13 @@ def process_index_rst(path):
|
||||
line = fp.readline()
|
||||
|
||||
return(d)
|
||||
|
||||
|
||||
h1= {
|
||||
"get_started":"Get started",
|
||||
"styles":"Styles",
|
||||
"anim":"Animations",
|
||||
"event":"Events",
|
||||
"layouts":"Layouts",
|
||||
"get_started":"Get started",
|
||||
"styles":"Styles",
|
||||
"anim":"Animations",
|
||||
"event":"Events",
|
||||
"layouts":"Layouts",
|
||||
"scroll":"Scrolling",
|
||||
"widgets":"Widgets"
|
||||
}
|
||||
@@ -103,7 +103,7 @@ def exec():
|
||||
d_all.update(d_act)
|
||||
|
||||
fout.write("```eval_rst\n")
|
||||
fout.write(".. include:: /header.rst\n")
|
||||
fout.write(".. include:: /header.rst\n")
|
||||
fout.write(":github_url: |github_link_base|/examples.md\n")
|
||||
fout.write("```\n")
|
||||
fout.write("\n")
|
||||
@@ -111,7 +111,7 @@ def exec():
|
||||
|
||||
for h in h1:
|
||||
fout.write("## " + h1[h] + "\n")
|
||||
|
||||
|
||||
if h == "widgets":
|
||||
for w in widgets:
|
||||
fout.write("### " + widgets[w] + "\n")
|
||||
@@ -121,7 +121,7 @@ def exec():
|
||||
fout.write("### " + layouts[l] + "\n")
|
||||
print_item(h + "/" + l, 4, d_all, fout)
|
||||
else:
|
||||
print_item(h, 3, d_all, fout)
|
||||
|
||||
print_item(h, 3, d_all, fout)
|
||||
|
||||
fout.write("")
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/bindings/micropython.md
|
||||
```
|
||||
# Cpp
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/bindings/index.md
|
||||
```
|
||||
# Bindings
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/bindings/micropython.md
|
||||
```
|
||||
# Micropython
|
||||
|
||||
## What is Micropython?
|
||||
|
||||
[Micropython](http://micropython.org/) is Python for microcontrollers.
|
||||
[Micropython](http://micropython.org/) is Python for microcontrollers.
|
||||
Using Micropython, you can write Python3 code and run it even on a bare metal architecture with limited resources.
|
||||
|
||||
### Highlights of Micropython
|
||||
@@ -27,15 +27,15 @@ Currently, Micropython [does not have a good high-level GUI library](https://for
|
||||
### Here are some advantages of using LVGL in Micropython:
|
||||
|
||||
- Develop GUI in Python, a very popular high level language. Use paradigms such as Object-Oriented Programming.
|
||||
- Usually, GUI development requires multiple iterations to get things right. With C, each iteration consists of **`Change code` > `Build` > `Flash` > `Run`**.
|
||||
- Usually, GUI development requires multiple iterations to get things right. With C, each iteration consists of **`Change code` > `Build` > `Flash` > `Run`**.
|
||||
In Micropython it's just **`Change code` > `Run`** ! You can even run commands interactively using the [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) (the interactive prompt)
|
||||
|
||||
### Micropython + LVGL could be used for:
|
||||
|
||||
- Fast prototyping GUI.
|
||||
- Fast prototyping GUI.
|
||||
- Shortening the cycle of changing and fine-tuning the GUI.
|
||||
- Modelling the GUI in a more abstract way by defining reusable composite objects, taking advantage of Python's language features such as Inheritance, Closures, List Comprehension, Generators, Exception Handling, Arbitrary Precision Integers and others.
|
||||
- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
|
||||
- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
|
||||
This goes well with [CircuitPython vision](https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython). CircuitPython was designed with education in mind, to make it easier for new or inexperienced users to get started with embedded development.
|
||||
- Creating tools to work with LVGL at a higher level (e.g. drag-and-drop designer).
|
||||
|
||||
@@ -46,7 +46,7 @@ This goes well with [CircuitPython vision](https://learn.adafruit.com/welcome-to
|
||||
> TL;DR:
|
||||
> It's very much like the C API, but Object-Oriented for LVGL components.
|
||||
|
||||
Let's dive right into an example!
|
||||
Let's dive right into an example!
|
||||
|
||||
### A simple example
|
||||
|
||||
@@ -65,7 +65,7 @@ lv.scr_load(scr)
|
||||
|
||||
### Online Simulator
|
||||
|
||||
If you want to experiment with LVGL + Micropython without downloading anything - you can use our online simulator!
|
||||
If you want to experiment with LVGL + Micropython without downloading anything - you can use our online simulator!
|
||||
It's a fully functional LVGL + Micropython that runs entirely in the browser and allows you to edit a python script and run it.
|
||||
|
||||
[Click here to experiment on the online simulator](https://sim.lvgl.io/)
|
||||
@@ -76,14 +76,14 @@ Note: the online simulator is available for lvgl v6 and v7.
|
||||
|
||||
### PC Simulator
|
||||
|
||||
Micropython is ported to many platforms. One notable port is "unix", which allows you to build and run Micropython (+LVGL) on a Linux machine. (On a Windows machine you might need Virtual Box or WSL or MinGW or Cygwin etc.)
|
||||
Micropython is ported to many platforms. One notable port is "unix", which allows you to build and run Micropython (+LVGL) on a Linux machine. (On a Windows machine you might need Virtual Box or WSL or MinGW or Cygwin etc.)
|
||||
|
||||
[Click here to know more information about building and running the unix port](https://github.com/lvgl/lv_micropython)
|
||||
|
||||
### Embedded platform
|
||||
|
||||
In the end, the goal is to run it all on an embedded platform.
|
||||
Both Micropython and LVGL can be used on many embedded architectures, such as stm32, ESP32 etc.
|
||||
In the end, the goal is to run it all on an embedded platform.
|
||||
Both Micropython and LVGL can be used on many embedded architectures, such as stm32, ESP32 etc.
|
||||
You would also need display and input drivers. We have some sample drivers (ESP32+ILI9341, as well as some other examples), but chances are you would want to create your own input/display drivers for your specific hardware.
|
||||
Drivers can be implemented either in C as a Micropython module, or in pure Micropython!
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/index.md
|
||||
```
|
||||
# Get started
|
||||
@@ -10,12 +10,12 @@ There are several ways to get your feet wet with LVGL. Here is one recommended o
|
||||
3. Read the [Quick overview](https://docs.lvgl.io/master/get-started/quick-overview.html) page of the documentation (15 minutes)
|
||||
4. Set up a [Simulator](https://docs.lvgl.io/master/get-started/platforms/pc-simulator.html) (10 minutes)
|
||||
5. Try out some [Examples](https://docs.lvgl.io/master/examples.html)
|
||||
6. Check out the Platform-specific tutorials. (in this section below). (10 minutes)
|
||||
6. Check out the Platform-specific tutorials. (in this section below). (10 minutes)
|
||||
7. Port LVGL to a board. See the [Porting](https://docs.lvgl.io/master/porting/index.html) guide or check the ready to use [Projects](https://github.com/lvgl?q=lv_port_&type=&language=)
|
||||
8. Read the [Overview](https://docs.lvgl.io/master/overview/index.html) page to get a better understanding of the library. (2-3 hours)
|
||||
9. Check the documentation of the [Widgets](https://docs.lvgl.io/master/widgets/index.html) to see their features and usage
|
||||
10. If you have questions got to the [Forum](http://forum.lvgl.io/)
|
||||
11. Read the [Contributing](https://docs.lvgl.io/master/CONTRIBUTING.html) guide to see how you can help to improve LVGL (15 minutes)
|
||||
11. Read the [Contributing](https://docs.lvgl.io/master/CONTRIBUTING.html) guide to see how you can help to improve LVGL (15 minutes)
|
||||
|
||||
|
||||
```eval_rst
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/os/index.md
|
||||
```
|
||||
# (RT)OS
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/os/nuttx.md
|
||||
```
|
||||
# NuttX RTOS
|
||||
|
||||
## What is NuttX?
|
||||
|
||||
[NuttX](https://nuttx.apache.org/) is a mature and secure real-time operating system (RTOS) with an emphasis on technical standards compliance and small size.
|
||||
[NuttX](https://nuttx.apache.org/) is a mature and secure real-time operating system (RTOS) with an emphasis on technical standards compliance and small size.
|
||||
It is scalable from 8-bit to 64-bit microcontrollers and microprocessors and compliant with the Portable Operating System Interface (POSIX) and the American National Standards Institute (ANSI) standards and with many Linux-like subsystems.
|
||||
The best way to think about NuttX is to think of it as a small Unix/Linux for microcontrollers.
|
||||
|
||||
@@ -23,8 +23,8 @@ The best way to think about NuttX is to think of it as a small Unix/Linux for mi
|
||||
|
||||
## Why NuttX + LVGL?
|
||||
|
||||
Although NuttX has its own graphic library called [NX](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629474), LVGL is a good alternative because users could find more eye-candy demos and they can reuse code from previous projects.
|
||||
LVGL is an [Object-Oriented Component Based](https://blog.lvgl.io/2018-12-13/extend-lvgl-objects) high-level GUI library, that could fit very well for a RTOS with advanced features like NuttX.
|
||||
Although NuttX has its own graphic library called [NX](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629474), LVGL is a good alternative because users could find more eye-candy demos and they can reuse code from previous projects.
|
||||
LVGL is an [Object-Oriented Component Based](https://blog.lvgl.io/2018-12-13/extend-lvgl-objects) high-level GUI library, that could fit very well for a RTOS with advanced features like NuttX.
|
||||
LVGL is implemented in C and its APIs are in C.
|
||||
|
||||
### Here are some advantages of using LVGL in NuttX
|
||||
@@ -80,7 +80,7 @@ $ make
|
||||
If everything went fine you should have now the file `nuttx.bin` to flash on your board:
|
||||
|
||||
```shell
|
||||
$ ls -l nuttx.bin
|
||||
$ ls -l nuttx.bin
|
||||
-rwxrwxr-x 1 alan alan 287144 Jun 27 09:26 nuttx.bin
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/arduino.md
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
The [LVGL library](https://github.com/lvgl/lvgl) is directly available as Arduino libraries.
|
||||
|
||||
Note that you need to choose a board powerful enough to run LVGL and your GUI. See the [requirements of LVGL](https://docs.lvgl.io/master/intro/index.html#requirements).
|
||||
Note that you need to choose a board powerful enough to run LVGL and your GUI. See the [requirements of LVGL](https://docs.lvgl.io/master/intro/index.html#requirements).
|
||||
|
||||
For example ESP32 is a good candidate to create UI's with LVGL.
|
||||
|
||||
@@ -15,13 +15,13 @@ For example ESP32 is a good candidate to create UI's with LVGL.
|
||||
|
||||
LVGL can be installed via the Arduino IDE Library Manager or as a .ZIP library.
|
||||
|
||||
You can [Download](https://github.com/lvgl/lvgl/archive/refs/heads/master.zip) the latest version of LVGL from GitHub and simply copy it to Arduino's library folder.
|
||||
You can [Download](https://github.com/lvgl/lvgl/archive/refs/heads/master.zip) the latest version of LVGL from GitHub and simply copy it to Arduino's library folder.
|
||||
|
||||
## Set up drivers
|
||||
|
||||
To get started it's recommended to use [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) library as a TFT driver to simplify testing.
|
||||
To get started it's recommended to use [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) library as a TFT driver to simplify testing.
|
||||
To make it work, setup `TFT_eSPI` according to your TFT display type via editing either
|
||||
- `User_Setup.h`
|
||||
- `User_Setup.h`
|
||||
- or by selecting a configuration in the `User_Setup_Select.h`
|
||||
|
||||
Both files are located in `TFT_eSPI` library's folder.
|
||||
@@ -61,8 +61,8 @@ Due to some the limitations of Arduino's build system you need to copy `lvgl/exa
|
||||
|
||||
## Debugging and logging
|
||||
|
||||
LVGL can display debug information in case of trouble.
|
||||
In the `LVGL_Arduino.ino` example there is a `my_print` method, which sends this debug information to the serial interface.
|
||||
LVGL can display debug information in case of trouble.
|
||||
In the `LVGL_Arduino.ino` example there is a `my_print` method, which sends this debug information to the serial interface.
|
||||
To enable this feature you have to edit the `lv_conf.h` file and enable logging in the section `log settings`:
|
||||
|
||||
```c
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/cmake.md
|
||||
```
|
||||
|
||||
@@ -46,14 +46,14 @@ This configuration declares a dependency between the two targets **MyFirmware**
|
||||
|
||||
### Additional CMake options
|
||||
Besides `LV_CONF_PATH` there are two additional CMake options to specify include paths.
|
||||
|
||||
`LV_LVGL_H_INCLUDE_SIMPLE` which specifies whether to `#include "lvgl.h"` absolut or relative
|
||||
|
||||
`LV_LVGL_H_INCLUDE_SIMPLE` which specifies whether to `#include "lvgl.h"` absolut or relative
|
||||
|
||||
| ON (default) | OFF |
|
||||
| ------------ | -------------- |
|
||||
| "lvgl.h" | "../../lvgl.h" |
|
||||
|
||||
`LV_CONF_INCLUDE_SIMPLE` which specifies whether to `#include "lv_conf.h"` and `"lv_drv_conf.h"` absolut or relative
|
||||
`LV_CONF_INCLUDE_SIMPLE` which specifies whether to `#include "lv_conf.h"` and `"lv_drv_conf.h"` absolut or relative
|
||||
|
||||
| ON (default) | OFF |
|
||||
| --------------- | --------------------- |
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/espressif.md
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/index.md
|
||||
```
|
||||
# Platforms
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platoforms/simulator.md
|
||||
```
|
||||
# Simulator on PC
|
||||
@@ -9,7 +9,7 @@ You can try out LVGL **using only your PC** (i.e. without any development boards
|
||||
|
||||
Using the simulator on a PC has the following advantages:
|
||||
- Hardware independent - Write code, run it on the PC and see the result on a monitor.
|
||||
- Cross-platform - Any Windows, Linux or macOS system can run the PC simulator.
|
||||
- Cross-platform - Any Windows, Linux or macOS system can run the PC simulator.
|
||||
- Portability - The written code is portable, which means you can simply copy it when migrating to embedded hardware.
|
||||
- Easy Validation - The simulator is also very useful to report bugs because it provides a common platform for every user. So it's a good idea to reproduce a bug in the simulator and use that code snippet in the [Forum](https://forum.lvgl.io).
|
||||
|
||||
@@ -34,7 +34,7 @@ The following section describes the set-up guide of Eclipse CDT in more detail.
|
||||
|
||||
[Eclipse CDT](https://eclipse.org/cdt/) is a C/C++ IDE.
|
||||
|
||||
Eclipse is a Java-based tool so be sure **Java Runtime Environment** is installed on your system.
|
||||
Eclipse is a Java-based tool so be sure **Java Runtime Environment** is installed on your system.
|
||||
|
||||
On Debian-based distros (e.g. Ubuntu): `sudo apt-get install default-jre`
|
||||
|
||||
@@ -45,7 +45,7 @@ You can download Eclipse's CDT from: [https://www.eclipse.org/cdt/downloads.php]
|
||||
|
||||
### Install SDL 2
|
||||
|
||||
The PC simulator uses the [SDL 2](https://www.libsdl.org/download-2.0.php) cross-platform library to simulate a TFT display and a touchpad.
|
||||
The PC simulator uses the [SDL 2](https://www.libsdl.org/download-2.0.php) cross-platform library to simulate a TFT display and a touchpad.
|
||||
|
||||
#### Linux
|
||||
On **Linux** you can easily install SDL2 using a terminal:
|
||||
@@ -58,14 +58,14 @@ On **Linux** you can easily install SDL2 using a terminal:
|
||||
#### Windows
|
||||
If you are using **Windows** firstly you need to install MinGW ([64 bit version](http://mingw-w64.org/doku.php/download)). After installing MinGW, do the following steps to add SDL2:
|
||||
|
||||
1. Download the development libraries of SDL.
|
||||
1. Download the development libraries of SDL.
|
||||
Go to [https://www.libsdl.org/download-2.0.php](https://www.libsdl.org/download-2.0.php) and download _Development Libraries: SDL2-devel-2.0.5-mingw.tar.gz_
|
||||
2. Decompress the file and go to _x86_64-w64-mingw32_ directory (for 64 bit MinGW) or to _i686-w64-mingw32_ (for 32 bit MinGW)
|
||||
3. Copy _..._mingw32/include/SDL2_ folder to _C:/MinGW/.../x86_64-w64-mingw32/include_
|
||||
4. Copy _..._mingw32/lib/_ content to _C:/MinGW/.../x86_64-w64-mingw32/lib_
|
||||
5. Copy _..._mingw32/bin/SDL2.dll_ to _{eclipse_workspace}/pc_simulator/Debug/_. Do it later when Eclipse is installed.
|
||||
5. Copy _..._mingw32/bin/SDL2.dll_ to _{eclipse_workspace}/pc_simulator/Debug/_. Do it later when Eclipse is installed.
|
||||
|
||||
Note: If you are using **Microsoft Visual Studio** instead of Eclipse then you don't have to install MinGW.
|
||||
Note: If you are using **Microsoft Visual Studio** instead of Eclipse then you don't have to install MinGW.
|
||||
|
||||
#### OSX
|
||||
On **OSX** you can easily install SDL2 with brew: `brew install sdl2`
|
||||
@@ -74,9 +74,9 @@ If something is not working, then please refer [this tutorial](http://lazyfoo.ne
|
||||
|
||||
### Pre-configured project
|
||||
|
||||
A pre-configured graphics library project (based on the latest release) is always available to get started easily.
|
||||
A pre-configured graphics library project (based on the latest release) is always available to get started easily.
|
||||
You can find the latest one on [GitHub](https://github.com/lvgl/lv_sim_eclipse_sdl).
|
||||
(Please note that, the project is configured for Eclipse CDT).
|
||||
(Please note that, the project is configured for Eclipse CDT).
|
||||
|
||||
### Add the pre-configured project to Eclipse CDT
|
||||
|
||||
@@ -86,7 +86,7 @@ Close the start-up window and go to **File->Import** and choose **General->
|
||||
|
||||
On **Windows** you have to do two additional things:
|
||||
|
||||
- Copy the **SDL2.dll** into the project's Debug folder
|
||||
- Copy the **SDL2.dll** into the project's Debug folder
|
||||
- Right-click on the project -> Project properties -> C/C++ Build -> Settings -> Libraries -> Add ... and add _mingw32_ above SDLmain and SDL. (The order is important: mingw32, SDLmain, SDL)
|
||||
|
||||
### Compile and Run
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/stm32.md
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/tasmota-berry.md
|
||||
```
|
||||
# Tasmota and berry
|
||||
@@ -39,10 +39,10 @@ Versions supported: LVGL v8.0.2, LodePNG v20201017, Freetype 2.10.4
|
||||
|
||||
### Tasmota + Berry + LVGL could be used for:
|
||||
|
||||
- Fast prototyping GUI.
|
||||
- Fast prototyping GUI.
|
||||
- Shortening the cycle of changing and fine-tuning the GUI.
|
||||
- Modelling the GUI in a more abstract way by defining reusable composite objects, taking advantage of Berry's language features such as Inheritance, Closures, Exception Handling...
|
||||
- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
|
||||
- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
|
||||
|
||||
A higher level interface compatible with [OpenHASP](https://github.com/HASwitchPlate/openHASP) is also under development.
|
||||
|
||||
@@ -53,7 +53,7 @@ A higher level interface compatible with [OpenHASP](https://github.com/HASwitchP
|
||||
> TL;DR:
|
||||
> Similar to MicroPython, it's very much like the C API, but Object-Oriented for LVGL components.
|
||||
|
||||
Let's dive right into an example!
|
||||
Let's dive right into an example!
|
||||
|
||||
### A simple example
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/quick-overview.md
|
||||
```
|
||||
|
||||
@@ -10,11 +10,11 @@ You should read this first to get a general impression and read the detailed [Po
|
||||
|
||||
## Get started in a simulator
|
||||
|
||||
Instead of porting LVGL to embedded hardware straight away, it's highly recommended to get started in a simulator first.
|
||||
Instead of porting LVGL to embedded hardware straight away, it's highly recommended to get started in a simulator first.
|
||||
|
||||
LVGL is ported to many IDEs to be sure you will find your favorite one.
|
||||
Go to the [Simulators](/get-started/pc-simulator) section to get ready-to-use projects that can be run on your PC.
|
||||
This way you can save the time of porting for now and get some experience with LVGL immediately.
|
||||
LVGL is ported to many IDEs to be sure you will find your favorite one.
|
||||
Go to the [Simulators](/get-started/pc-simulator) section to get ready-to-use projects that can be run on your PC.
|
||||
This way you can save the time of porting for now and get some experience with LVGL immediately.
|
||||
|
||||
## Add LVGL into your project
|
||||
If you would rather try LVGL on your own project follow these steps:
|
||||
@@ -23,11 +23,11 @@ If you would rather try LVGL on your own project follow these steps:
|
||||
- Copy the `lvgl` folder into your project.
|
||||
- Copy `lvgl/lv_conf_template.h` as `lv_conf.h` next to the `lvgl` folder, change the first `#if 0` to `1` to enable the file's content and set the `LV_COLOR_DEPTH` defines.
|
||||
- Include `lvgl/lvgl.h` in files where you need to use LVGL related functions.
|
||||
- Call `lv_tick_inc(x)` every `x` milliseconds in a Timer or Task (`x` should be between 1 and 10). It is required for the internal timing of LVGL.
|
||||
- Call `lv_tick_inc(x)` every `x` milliseconds in a Timer or Task (`x` should be between 1 and 10). It is required for the internal timing of LVGL.
|
||||
Alternatively, configure `LV_TICK_CUSTOM` (see `lv_conf.h`) so that LVGL can retrieve the current time directly.
|
||||
- Call `lv_init()`
|
||||
- Create a draw buffer: LVGL will render the graphics here first, and send the rendered image to the display.
|
||||
The buffer size can be set freely but 1/10 screen size is a good starting point.
|
||||
- Create a draw buffer: LVGL will render the graphics here first, and send the rendered image to the display.
|
||||
The buffer size can be set freely but 1/10 screen size is a good starting point.
|
||||
```c
|
||||
static lv_disp_draw_buf_t draw_buf;
|
||||
static lv_color_t buf1[DISP_HOR_RES * DISP_VER_RES / 10]; /*Declare a buffer for 1/10 screen size*/
|
||||
@@ -76,7 +76,7 @@ void my_touchpad_read(lv_indev_t * indev, lv_indev_data_t * data)
|
||||
} else {
|
||||
data->state = LV_INDEV_STATE_RELEASED;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
- Call `lv_timer_handler()` periodically every few milliseconds in the main `while(1)` loop or in an operating system task.
|
||||
@@ -90,13 +90,13 @@ For a more detailed guide go to the [Porting](/porting/index) section.
|
||||
|
||||
The graphical elements like Buttons, Labels, Sliders, Charts etc. are called objects or widgets. Go to [Widgets](/widgets/index) to see the full list of available widgets.
|
||||
|
||||
Every object has a parent object where it is created. For example, if a label is created on a button, the button is the parent of label.
|
||||
Every object has a parent object where it is created. For example, if a label is created on a button, the button is the parent of label.
|
||||
|
||||
The child object moves with the parent and if the parent is deleted the children will be deleted too.
|
||||
The child object moves with the parent and if the parent is deleted the children will be deleted too.
|
||||
|
||||
Children can be visible only within their parent's bounding area. In other words, the parts of the children outside the parent are clipped.
|
||||
|
||||
A Screen is the "root" parent. You can have any number of screens.
|
||||
A Screen is the "root" parent. You can have any number of screens.
|
||||
|
||||
To get the current screen call `lv_scr_act()`, and to load a screen use `lv_scr_load(scr1)`.
|
||||
|
||||
@@ -124,8 +124,8 @@ To see the full API visit the documentation of the widgets or the related header
|
||||
|
||||
|
||||
### Events
|
||||
Events are used to inform the user that something has happened with an object.
|
||||
You can assign one or more callbacks to an object which will be called if the object is clicked, released, dragged, being deleted, etc.
|
||||
Events are used to inform the user that something has happened with an object.
|
||||
You can assign one or more callbacks to an object which will be called if the object is clicked, released, dragged, being deleted, etc.
|
||||
|
||||
A callback is assigned like this:
|
||||
|
||||
@@ -140,7 +140,7 @@ void btn_event_cb(lv_event_t * e)
|
||||
}
|
||||
```
|
||||
|
||||
`LV_EVENT_ALL` can be used instead of `LV_EVENT_CLICKED` to invoke the callback for any event.
|
||||
`LV_EVENT_ALL` can be used instead of `LV_EVENT_CLICKED` to invoke the callback for any event.
|
||||
|
||||
From `lv_event_t * e` the current event code can be retrieved with:
|
||||
```c
|
||||
@@ -166,13 +166,13 @@ Read the widgets' documentation to learn which parts each uses.
|
||||
LVGL objects can be in a combination of the following states:
|
||||
- `LV_STATE_DEFAULT` Normal, released state
|
||||
- `LV_STATE_CHECKED` Toggled or checked state
|
||||
- `LV_STATE_FOCUSED` Focused via keypad or encoder or clicked via touchpad/mouse
|
||||
- `LV_STATE_FOCUS_KEY` Focused via keypad or encoder but not via touchpad/mouse
|
||||
- `LV_STATE_FOCUSED` Focused via keypad or encoder or clicked via touchpad/mouse
|
||||
- `LV_STATE_FOCUS_KEY` Focused via keypad or encoder but not via touchpad/mouse
|
||||
- `LV_STATE_EDITED` Edit by an encoder
|
||||
- `LV_STATE_HOVERED` Hovered by mouse (not supported now)
|
||||
- `LV_STATE_PRESSED` Being pressed
|
||||
- `LV_STATE_SCROLLED` Being scrolled
|
||||
- `LV_STATE_DISABLED` Disabled
|
||||
- `LV_STATE_DISABLED` Disabled
|
||||
|
||||
For example, if you press an object it will automatically go to the `LV_STATE_FOCUSED` and `LV_STATE_PRESSED` states and when you release it the `LV_STATE_PRESSED` state will be removed while focus remains active.
|
||||
|
||||
@@ -219,8 +219,8 @@ lv_obj_add_style(btn1, &style1, 0); /*Equal to LV_PART_MAIN | LV_STATE_DEFAULT*/
|
||||
```
|
||||
|
||||
|
||||
Styles can be cascaded (similarly to CSS). It means you can add more styles to a part of an object.
|
||||
For example `style_btn` can set a default button appearance, and `style_btn_red` can overwrite the background color to make the button red:
|
||||
Styles can be cascaded (similarly to CSS). It means you can add more styles to a part of an object.
|
||||
For example `style_btn` can set a default button appearance, and `style_btn_red` can overwrite the background color to make the button red:
|
||||
```c
|
||||
lv_obj_add_style(btn1, &style_btn, 0);
|
||||
lv_obj_add_style(btn1, &style1_btn_red, 0);
|
||||
@@ -229,23 +229,23 @@ lv_obj_add_style(btn1, &style1_btn_red, 0);
|
||||
|
||||
If a property is not set on for the current state, the style with `LV_STATE_DEFAULT` will be used. A default value is used if the property is not defined in the default state.
|
||||
|
||||
Some properties (typically the text-related ones) can be inherited. This means if a property is not set in an object it will be searched for in its parents too.
|
||||
For example, you can set the font once in the screen's style and all text on that screen will inherit it by default.
|
||||
Some properties (typically the text-related ones) can be inherited. This means if a property is not set in an object it will be searched for in its parents too.
|
||||
For example, you can set the font once in the screen's style and all text on that screen will inherit it by default.
|
||||
|
||||
|
||||
Local style properties also can be added to objects. This creates a style which resides inside the object and is used only by the object:
|
||||
```c
|
||||
lv_obj_set_style_bg_color(slider1, lv_color_hex(0x2080bb), LV_PART_INDICATOR | LV_STATE_PRESSED);
|
||||
```
|
||||
```
|
||||
|
||||
To learn all the features of styles see the [Style overview](/overview/style) section.
|
||||
|
||||
|
||||
### Themes
|
||||
|
||||
Themes are the default styles for objects. Styles from a theme are applied automatically when objects are created.
|
||||
Themes are the default styles for objects. Styles from a theme are applied automatically when objects are created.
|
||||
|
||||
The theme for your application is a compile time configuration set in `lv_conf.h`.
|
||||
The theme for your application is a compile time configuration set in `lv_conf.h`.
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/index.md
|
||||
```
|
||||
|
||||
@@ -13,20 +13,20 @@ PDF version: :download:`LVGL.pdf <LVGL.pdf>`
|
||||
<img src="_static/img/home_banner.jpg" style="width:100%">
|
||||
|
||||
|
||||
<div style="margin-bottom:48px">
|
||||
<div style="margin-bottom:48px">
|
||||
<a href="intro/index.html"><img class="home-img" src="_static/img/home_1.png" alt="Get familiar with the LVGL project"></a>
|
||||
<a href="get-started/index.html"><img class="home-img" src="_static/img/home_2.png" alt="Learn the basic of LVGL and its usage on various platforms"></a>
|
||||
<a href="porting/index.html"><img class="home-img" src="_static/img/home_3.png" alt="See how to port LVGL to any platform"></a>
|
||||
<a href="overview/index.html"><img class="home-img" src="_static/img/home_4.png" alt="Learn the how LVGL works in more detail"></a>
|
||||
<a href="widgets/index.html"><img class="home-img" src="_static/img/home_5.png" alt="Take a look at the description of the available widgets"></a>
|
||||
<a href="CONTRIBUTING.html"><img class="home-img" src="_static/img/home_6.png" alt="Be part of the development of LVGL"></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
intro/index
|
||||
examples
|
||||
get-started/index
|
||||
|
||||
+19
-19
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/intro/index.md
|
||||
```
|
||||
|
||||
@@ -32,7 +32,7 @@ Basically, every modern controller which is able to drive a display is suitable
|
||||
<li> 16, 32 or 64 bit microcontroller or processor</li>
|
||||
<li>> 16 MHz clock speed is recommended</li>
|
||||
<li> Flash/ROM: > 64 kB for the very essential components (> 180 kB is recommended)</li>
|
||||
<li> RAM:
|
||||
<li> RAM:
|
||||
<ul>
|
||||
<li> Static RAM usage: ~2 kB depending on the used features and object types</li>
|
||||
<li> Stack: > 2kB (> 8 kB is recommended)</li>
|
||||
@@ -43,22 +43,22 @@ Basically, every modern controller which is able to drive a display is suitable
|
||||
</ul>
|
||||
</li>
|
||||
<li> C99 or newer compiler</li>
|
||||
<li> Basic C (or C++) knowledge:
|
||||
<a href="https://www.tutorialspoint.com/cprogramming/c_pointers.htm">pointers</a>,
|
||||
<a href="https://www.tutorialspoint.com/cprogramming/c_structures.htm">structs</a>,
|
||||
<li> Basic C (or C++) knowledge:
|
||||
<a href="https://www.tutorialspoint.com/cprogramming/c_pointers.htm">pointers</a>,
|
||||
<a href="https://www.tutorialspoint.com/cprogramming/c_structures.htm">structs</a>,
|
||||
<a href="https://www.geeksforgeeks.org/callbacks-in-c/">callbacks</a>.</li>
|
||||
</ul>
|
||||
<em>Note that memory usage may vary depending on architecture, compiler and build options.</em>
|
||||
|
||||
## License
|
||||
The LVGL project (including all repositories) is licensed under [MIT license](https://github.com/lvgl/lvgl/blob/master/LICENCE.txt).
|
||||
The LVGL project (including all repositories) is licensed under [MIT license](https://github.com/lvgl/lvgl/blob/master/LICENCE.txt).
|
||||
This means you can use it even in commercial projects.
|
||||
|
||||
It's not mandatory, but we highly appreciate it if you write a few words about your project in the [My projects](https://forum.lvgl.io/c/my-projects/10) category of the forum or a private message to [lvgl.io](https://lvgl.io/#contact).
|
||||
|
||||
Although you can get LVGL for free there is a massive amount of work behind it. It's created by a group of volunteers who made it available for you in their free time.
|
||||
|
||||
To make the LVGL project sustainable, please consider [contributing](/CONTRIBUTING) to the project.
|
||||
To make the LVGL project sustainable, please consider [contributing](/CONTRIBUTING) to the project.
|
||||
You can choose from [many different ways of contributing](/CONTRIBUTING) such as simply writing a tweet about you using LVGL, fixing bugs, translating the documentation, or even becoming a maintainer.
|
||||
|
||||
## Repository layout
|
||||
@@ -90,7 +90,7 @@ Tags like `vX.Y.Z` are created for every release.
|
||||
|
||||
### Branches
|
||||
The core repositories have at least the following branches:
|
||||
- `master` latest version, patches are merged directly here.
|
||||
- `master` latest version, patches are merged directly here.
|
||||
- `release/vX.Y` stable versions of the minor releases
|
||||
- `fix/some-description` temporary branches for bug fixes
|
||||
- `feat/some-description` temporary branches for features
|
||||
@@ -119,8 +119,8 @@ Starting from v8, every minor release is supported for 1 year.
|
||||
### Where can I ask questions?
|
||||
You can ask questions in the forum: [https://forum.lvgl.io/](https://forum.lvgl.io/).
|
||||
|
||||
We use [GitHub issues](https://github.com/lvgl/lvgl/issues) for development related discussion.
|
||||
You should use them only if your question or issue is tightly related to the development of the library.
|
||||
We use [GitHub issues](https://github.com/lvgl/lvgl/issues) for development related discussion.
|
||||
You should use them only if your question or issue is tightly related to the development of the library.
|
||||
|
||||
Before posting a question, please ready this FAQ section as you might find answer to your issue here too.
|
||||
|
||||
@@ -128,17 +128,17 @@ Before posting a question, please ready this FAQ section as you might find answe
|
||||
Every MCU which is capable of driving a display via parallel port, SPI, RGB interface or anything else and fulfills the [Requirements](#requirements) is supported by LVGL.
|
||||
|
||||
This includes:
|
||||
- "Common" MCUs like STM32F, STM32H, NXP Kinetis, LPC, iMX, dsPIC33, PIC32 etc.
|
||||
- "Common" MCUs like STM32F, STM32H, NXP Kinetis, LPC, iMX, dsPIC33, PIC32 etc.
|
||||
- Bluetooth, GSM, Wi-Fi modules like Nordic NRF and Espressif ESP32
|
||||
- Linux with frame buffer device such as /dev/fb0. This includes Single-board computers like the Raspberry Pi
|
||||
- Anything else with a strong enough MCU and a peripheral to drive a display
|
||||
|
||||
### Is my display supported?
|
||||
LVGL needs just one simple driver function to copy an array of pixels into a given area of the display.
|
||||
LVGL needs just one simple driver function to copy an array of pixels into a given area of the display.
|
||||
If you can do this with your display then you can use it with LVGL.
|
||||
|
||||
Some examples of the supported display types:
|
||||
- TFTs with 16 or 24 bit color depth
|
||||
- TFTs with 16 or 24 bit color depth
|
||||
- Monitors with an HDMI port
|
||||
- Small monochrome displays
|
||||
- Gray-scale displays
|
||||
@@ -162,8 +162,8 @@ Be sure you are calling `lv_tick_inc(x)` in an interrupt and `lv_timer_handler()
|
||||
|
||||
Learn more in the [Tick](/porting/tick) and [Task handler](/porting/task-handler) sections.
|
||||
|
||||
### Why is the display driver called only once? Only the upper part of the display is refreshed.
|
||||
Be sure you are calling `lv_disp_flush_ready(drv)` at the end of your "*display flush callback*".
|
||||
### Why is the display driver called only once? Only the upper part of the display is refreshed.
|
||||
Be sure you are calling `lv_disp_flush_ready(drv)` at the end of your "*display flush callback*".
|
||||
|
||||
### Why do I see only garbage on the screen?
|
||||
Probably there a bug in your display driver. Try the following code without using LVGL. You should see a square with red-blue gradient.
|
||||
@@ -191,16 +191,16 @@ a.y2 = a.y1 + BUF_H - 1;
|
||||
my_flush_cb(NULL, &a, buf);
|
||||
```
|
||||
|
||||
### Why do I see nonsense colors on the screen?
|
||||
### Why do I see nonsense colors on the screen?
|
||||
Probably LVGL's color format is not compatible with your display's color format. Check `LV_COLOR_DEPTH` in *lv_conf.h*.
|
||||
|
||||
If you are using 16-bit colors with SPI (or another byte-oriented interface) you probably need to set `LV_COLOR_16_SWAP 1` in *lv_conf.h*.
|
||||
If you are using 16-bit colors with SPI (or another byte-oriented interface) you probably need to set `LV_COLOR_16_SWAP 1` in *lv_conf.h*.
|
||||
It swaps the upper and lower bytes of the pixels.
|
||||
|
||||
### How to speed up my UI?
|
||||
- Turn on compiler optimization and enable cache if your MCU has it
|
||||
- Increase the size of the display buffer
|
||||
- Use two display buffers and flush the buffer with DMA (or similar peripheral) in the background
|
||||
- Use two display buffers and flush the buffer with DMA (or similar peripheral) in the background
|
||||
- Increase the clock speed of the SPI or parallel port if you use them to drive the display
|
||||
- If your display has an SPI port consider changing to a model with a parallel interface because it has much higher throughput
|
||||
- Keep the display buffer in internal RAM (not in external SRAM) because LVGL uses it a lot and it should have a fast access time
|
||||
@@ -211,7 +211,7 @@ You can disable all the unused features (such as animations, file system, GPU et
|
||||
If you are using GCC you can add `-fdata-sections -ffunction-sections` compiler flags and `--gc-sections` linker flag to remove unused functions and variables from the final binary.
|
||||
|
||||
### How to reduce the RAM usage
|
||||
- Lower the size of the *Display buffer*
|
||||
- Lower the size of the *Display buffer*
|
||||
- Reduce `LV_MEM_SIZE` in *lv_conf.h*. This memory is used when you create objects like buttons, labels, etc.
|
||||
- To work with lower `LV_MEM_SIZE` you can create objects only when required and delete them when they are not needed anymore
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/layouts/flex.md
|
||||
```
|
||||
|
||||
@@ -13,14 +13,14 @@ It can arrange items into rows or columns (tracks), handle wrapping, adjust the
|
||||
|
||||
To make an object flex container call `lv_obj_set_layout(obj, LV_LAYOUT_FLEX)`.
|
||||
|
||||
Note that the flex layout feature of LVGL needs to be globally enabled with `LV_USE_FLEX` in `lv_conf.h`.
|
||||
Note that the flex layout feature of LVGL needs to be globally enabled with `LV_USE_FLEX` in `lv_conf.h`.
|
||||
|
||||
## Terms
|
||||
- tracks: the rows or columns
|
||||
- main direction: row or column, the direction in which the items are placed
|
||||
- cross direction: perpendicular to the main direction
|
||||
- wrap: if there is no more space in the track a new track is started
|
||||
- grow: if set on an item it will grow to fill the remaining space on the track.
|
||||
- grow: if set on an item it will grow to fill the remaining space on the track.
|
||||
The available space will be distributed among items respective to their grow value (larger value means more space)
|
||||
- gap: the space between the rows and columns or the items on a track
|
||||
|
||||
@@ -54,8 +54,8 @@ The possible values are:
|
||||
- `LV_FLEX_ALIGN_END` means right on a horizontally and bottom vertically
|
||||
- `LV_FLEX_ALIGN_CENTER` simply center
|
||||
- `LV_FLEX_ALIGN_SPACE_EVENLY` items are distributed so that the spacing between any two items (and the space to the edges) is equal. Does not apply to `track_cross_place`.
|
||||
- `LV_FLEX_ALIGN_SPACE_AROUND` items are evenly distributed in the track with equal space around them.
|
||||
Note that visually the spaces aren’t equal, since all the items have equal space on both sides.
|
||||
- `LV_FLEX_ALIGN_SPACE_AROUND` items are evenly distributed in the track with equal space around them.
|
||||
Note that visually the spaces aren’t equal, since all the items have equal space on both sides.
|
||||
The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies. Not applies to `track_cross_place`.
|
||||
- `LV_FLEX_ALIGN_SPACE_BETWEEN` items are evenly distributed in the track: first item is on the start line, last item on the end line. Not applies to `track_cross_place`.
|
||||
|
||||
@@ -87,13 +87,13 @@ All the Flex-related values are style properties under the hood and you can use
|
||||
|
||||
To modify the minimum space flexbox inserts between objects, the following properties can be set on the flex container style:
|
||||
|
||||
- `pad_row` Sets the padding between the rows.
|
||||
- `pad_row` Sets the padding between the rows.
|
||||
|
||||
- `pad_column` Sets the padding between the columns.
|
||||
|
||||
These can for example be used if you don't want any padding between your objects: `lv_style_set_pad_column(&row_container_style,0)`
|
||||
|
||||
## Other features
|
||||
## Other features
|
||||
|
||||
### RTL
|
||||
If the base direction of the container is set the `LV_BASE_DIR_RTL` the meaning of `LV_FLEX_ALIGN_START` and `LV_FLEX_ALIGN_END` is swapped on `ROW` layouts. I.e. `START` will mean right.
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/layouts/grid.md
|
||||
```
|
||||
|
||||
@@ -14,11 +14,11 @@ The track's size can be set in pixel, to the largest item (`LV_GRID_CONTENT`) or
|
||||
|
||||
To make an object a grid container call `lv_obj_set_layout(obj, LV_LAYOUT_GRID)`.
|
||||
|
||||
Note that the grid layout feature of LVGL needs to be globally enabled with `LV_USE_GRID` in `lv_conf.h`.
|
||||
Note that the grid layout feature of LVGL needs to be globally enabled with `LV_USE_GRID` in `lv_conf.h`.
|
||||
|
||||
## Terms
|
||||
- tracks: the rows or columns
|
||||
- free unit (FR): if set on track's size is set in `FR` it will grow to fill the remaining space on the parent.
|
||||
- free unit (FR): if set on track's size is set in `FR` it will grow to fill the remaining space on the parent.
|
||||
- gap: the space between the rows and columns or the items on a track
|
||||
|
||||
## Simple interface
|
||||
@@ -42,7 +42,7 @@ Besides simple settings the size in pixel you can use two special values:
|
||||
- `LV_GRID_FR(X)` tell what portion of the remaining space should be used by this track. Larger value means larger space.
|
||||
|
||||
### Grid items
|
||||
By default, the children are not added to the grid. They need to be added manually to a cell.
|
||||
By default, the children are not added to the grid. They need to be added manually to a cell.
|
||||
|
||||
To do this call `lv_obj_set_grid_cell(child, column_align, column_pos, column_span, row_align, row_pos, row_span)`.
|
||||
|
||||
@@ -51,9 +51,9 @@ To do this call `lv_obj_set_grid_cell(child, column_align, column_pos, column_sp
|
||||
- `LV_GRID_ALIGN_END` means right on a horizontally and bottom vertically
|
||||
- `LV_GRID_ALIGN_CENTER` simply center
|
||||
|
||||
`colum_pos` and `row_pos` means the zero based index of the cell into the item should be placed.
|
||||
`colum_pos` and `row_pos` means the zero based index of the cell into the item should be placed.
|
||||
|
||||
`colum_span` and `row_span` means how many tracks should the item involve from the start cell. Must be > 1.
|
||||
`colum_span` and `row_span` means how many tracks should the item involve from the start cell. Must be > 1.
|
||||
|
||||
### Grid align
|
||||
|
||||
@@ -62,8 +62,8 @@ If there are some empty space the track can be aligned several ways:
|
||||
- `LV_GRID_ALIGN_END` means right on a horizontally and bottom vertically
|
||||
- `LV_GRID_ALIGN_CENTER` simply center
|
||||
- `LV_GRID_ALIGN_SPACE_EVENLY` items are distributed so that the spacing between any two items (and the space to the edges) is equal. Not applies to `track_cross_place`.
|
||||
- `LV_GRID_ALIGN_SPACE_AROUND` items are evenly distributed in the track with equal space around them.
|
||||
Note that visually the spaces aren’t equal, since all the items have equal space on both sides.
|
||||
- `LV_GRID_ALIGN_SPACE_AROUND` items are evenly distributed in the track with equal space around them.
|
||||
Note that visually the spaces aren’t equal, since all the items have equal space on both sides.
|
||||
The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies. Not applies to `track_cross_place`.
|
||||
- `LV_GRID_ALIGN_SPACE_BETWEEN` items are evenly distributed in the track: first item is on the start line, last item on the end line. Not applies to `track_cross_place`.
|
||||
|
||||
@@ -88,10 +88,10 @@ All the Grid related values are style properties under the hood and you can use
|
||||
|
||||
To modify the minimum space Grid inserts between objects, the following properties can be set on the Grid container style:
|
||||
|
||||
- `pad_row` Sets the padding between the rows.
|
||||
- `pad_row` Sets the padding between the rows.
|
||||
- `pad_column` Sets the padding between the columns.
|
||||
|
||||
## Other features
|
||||
## Other features
|
||||
|
||||
### RTL
|
||||
If the base direction of the container is set to `LV_BASE_DIR_RTL`, the meaning of `LV_GRID_ALIGN_START` and `LV_GRID_ALIGN_END` is swapped. I.e. `START` will mean right-most.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/layouts/index.md
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
flex
|
||||
grid
|
||||
```
|
||||
|
||||
+6
-6
@@ -1,23 +1,23 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/bmp.md
|
||||
```
|
||||
|
||||
# BMP decoder
|
||||
# BMP decoder
|
||||
|
||||
This extension allows the use of BMP images in LVGL.
|
||||
This extension allows the use of BMP images in LVGL.
|
||||
This implementation uses [bmp-decoder](https://github.com/caj-johnson/bmp-decoder) library.
|
||||
The pixels are read on demand (not the whole image is loaded) so using BMP images requires very little RAM.
|
||||
The pixels are read on demand (not the whole image is loaded) so using BMP images requires very little RAM.
|
||||
|
||||
If enabled in `lv_conf.h` by `LV_USE_BMP` LVGL will register a new image decoder automatically so BMP files can be directly used as image sources. For example:
|
||||
```
|
||||
lv_img_set_src(my_img, "S:path/to/picture.bmp");
|
||||
```
|
||||
|
||||
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
|
||||
## Limitations
|
||||
- Only BMP files are supported and BMP images as C array (`lv_img_dsc_t`) are not. It's because there is no practical differences between how the BMP files and LVGL's image format stores the image data.
|
||||
- Only BMP files are supported and BMP images as C array (`lv_img_dsc_t`) are not. It's because there is no practical differences between how the BMP files and LVGL's image format stores the image data.
|
||||
- BMP files can be loaded only from file. If you want to store them in flash it's better to convert them to C array with [LVGL's image converter](https://lvgl.io/tools/imageconverter).
|
||||
- The BMP files color format needs to match with `LV_COLOR_DEPTH`. Use GIMP to save the image in the required format.
|
||||
Both RGB888 and ARGB888 works with `LV_COLOR_DEPTH 32`
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/ffmpeg.md
|
||||
```
|
||||
|
||||
@@ -21,7 +21,7 @@ Enable `LV_USE_FFMPEG` in `lv_conf.h`.
|
||||
|
||||
See the examples below.
|
||||
|
||||
Note that, the FFmpeg extension doesn't use LVGL's file system.
|
||||
Note that, the FFmpeg extension doesn't use LVGL's file system.
|
||||
You can simply pass the path to the image or video as usual on your operating system or platform.
|
||||
|
||||
## Example
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/freetype.md
|
||||
```
|
||||
|
||||
@@ -34,7 +34,7 @@ Font style supports bold and italic, you can use the following macros to set:
|
||||
|
||||
They can be combined.eg:`FT_FONT_STYLE_BOLD | FT_FONT_STYLE_ITALIC`.
|
||||
|
||||
Note that, the FreeType extension doesn't use LVGL's file system.
|
||||
Note that, the FreeType extension doesn't use LVGL's file system.
|
||||
You can simply pass the path to the font as usual on your operating system or platform.
|
||||
|
||||
## Example
|
||||
@@ -44,7 +44,7 @@ You can simply pass the path to the font as usual on your operating system or pl
|
||||
|
||||
|
||||
## Learn more
|
||||
- FreeType [tutorial](https://www.freetype.org/freetype2/docs/tutorial/step1.html)
|
||||
- FreeType [tutorial](https://www.freetype.org/freetype2/docs/tutorial/step1.html)
|
||||
- LVGL's [font interface](https://docs.lvgl.io/v7/en/html/overview/font.html#add-a-new-font-engine)
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/fsdrv.md
|
||||
```
|
||||
|
||||
@@ -20,6 +20,6 @@ You still need to provide the drivers and libraries, this extension provides onl
|
||||
In `lv_conf.h` enable `LV_USE_FS_...` and assign an upper cased letter to `LV_FS_..._LETTER` (e.g. `'S'`).
|
||||
After that you can access files using that driver letter. E.g. `"S:path/to/file.txt"`.
|
||||
|
||||
The work directory can be set with `LV_FS_..._PATH`. E.g. `"/home/joe/projects/"` The actual file/directory paths will be appended to it.
|
||||
The work directory can be set with `LV_FS_..._PATH`. E.g. `"/home/joe/projects/"` The actual file/directory paths will be appended to it.
|
||||
|
||||
Cached reading is also supported if `LV_FS_..._CACHE_SIZE` is set to not `0` value. `lv_fs_read` caches this size of data to lower the number of actual reads from the storage.
|
||||
Cached reading is also supported if `LV_FS_..._CACHE_SIZE` is set to not `0` value. `lv_fs_read` caches this size of data to lower the number of actual reads from the storage.
|
||||
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/gif.md
|
||||
```
|
||||
|
||||
@@ -13,7 +13,7 @@ When enabled in `lv_conf.h` with `LV_USE_GIF` `lv_gif_create(parent)` can be use
|
||||
|
||||
## Convert GIF files to C array
|
||||
To convert a GIF file to byte values array use [LVGL's online converter](https://lvgl.io/tools/imageconverter). Select "Raw" color format and "C array" Output format.
|
||||
|
||||
|
||||
|
||||
## Use GIF images from file
|
||||
For example:
|
||||
@@ -21,14 +21,14 @@ For example:
|
||||
lv_gif_set_src(obj, "S:path/to/example.gif");
|
||||
```
|
||||
|
||||
Note that, a file system driver needs to be registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
Note that, a file system driver needs to be registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
|
||||
|
||||
## Memory requirements
|
||||
To decode and display a GIF animation the following amount of RAM is required:
|
||||
- `LV_COLOR_DEPTH 8`: 3 x image width x image height
|
||||
- `LV_COLOR_DEPTH 16`: 4 x image width x image height
|
||||
- `LV_COLOR_DEPTH 32`: 5 x image width x image height
|
||||
- `LV_COLOR_DEPTH 8`: 3 x image width x image height
|
||||
- `LV_COLOR_DEPTH 16`: 4 x image width x image height
|
||||
- `LV_COLOR_DEPTH 32`: 5 x image width x image height
|
||||
|
||||
## Example
|
||||
```eval_rst
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/index.md
|
||||
```
|
||||
# 3rd party libraries
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
|
||||
fsdrv
|
||||
bmp
|
||||
sjpg
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/png.md
|
||||
```
|
||||
|
||||
@@ -9,11 +9,11 @@ Allow the use of PNG images in LVGL. This implementation uses [lodepng](https://
|
||||
|
||||
If enabled in `lv_conf.h` by `LV_USE_PNG` LVGL will register a new image decoder automatically so PNG files can be directly used as any other image sources.
|
||||
|
||||
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
|
||||
The whole PNG image is decoded so during decoding RAM equals to `image width x image height x 4` bytes are required.
|
||||
|
||||
As it might take significant time to decode PNG images LVGL's [images caching](https://docs.lvgl.io/master/overview/image.html#image-caching) feature can be useful.
|
||||
As it might take significant time to decode PNG images LVGL's [images caching](https://docs.lvgl.io/master/overview/image.html#image-caching) feature can be useful.
|
||||
|
||||
## Example
|
||||
```eval_rst
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/qrcode.md
|
||||
```
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ The default animation mode is **play forward with loop**.
|
||||
|
||||
If you don't enable looping, a `LV_EVENT_READY` is sent when the animation can not make more progress without looping.
|
||||
|
||||
To get the number of frames in an animation or the current frame index, you can cast the `lv_obj_t` instance to a `lv_rlottie_t` instance and inspect the `current_frame` and `total_frames` members.
|
||||
To get the number of frames in an animation or the current frame index, you can cast the `lv_obj_t` instance to a `lv_rlottie_t` instance and inspect the `current_frame` and `total_frames` members.
|
||||
|
||||
## Example
|
||||
```eval_rst
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/libs/sjpg.md
|
||||
```
|
||||
|
||||
@@ -26,17 +26,17 @@ If enabled in `lv_conf.h` by `LV_USE_SJPG` LVGL will register a new image decode
|
||||
lv_img_set_src(my_img, "S:path/to/picture.jpg");
|
||||
```
|
||||
|
||||
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
|
||||
|
||||
|
||||
|
||||
## Converter
|
||||
|
||||
### Converting JPG to C array
|
||||
- Use lvgl online tool https://lvgl.io/tools/imageconverter
|
||||
- Use lvgl online tool https://lvgl.io/tools/imageconverter
|
||||
- Color format = RAW, output format = C Array
|
||||
|
||||
### Converting JPG to SJPG
|
||||
|
||||
### Converting JPG to SJPG
|
||||
python3 and the PIL library required. (PIL can be installed with `pip3 install pillow`)
|
||||
|
||||
To create SJPG from JPG:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/others/fragment.md
|
||||
```
|
||||
|
||||
@@ -15,7 +15,7 @@ to, the host’s view hierarchy.
|
||||
Such concept also has some similarities
|
||||
to [UiViewController on iOS](https://developer.apple.com/documentation/uikit/uiviewcontroller).
|
||||
|
||||
Fragment Manager is a manager holding references to fragments attached to it, and has an internal stack to achieve
|
||||
Fragment Manager is a manager holding references to fragments attached to it, and has an internal stack to achieve
|
||||
navigation. You can use fragment manager to build navigation stack, or multi pane application easily.
|
||||
|
||||
## Usage
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/others/gridnav.md
|
||||
```
|
||||
# Grid navigation
|
||||
@@ -15,30 +15,30 @@ This means that gridnav works with manually positioned children, as well as [Fle
|
||||
Gridnav also works if the children are arranged into a single row or column.
|
||||
That makes it useful, for example, to simplify navigation on a [List widget](/widgets/extra/list).
|
||||
|
||||
Gridnav assumes that the object to which gridnav is added is part of a [group](/overview/indev.html#groups).
|
||||
Gridnav assumes that the object to which gridnav is added is part of a [group](/overview/indev.html#groups).
|
||||
This way, if the object with gridnav is focused, the arrow key presses are automatically forwarded to the object
|
||||
so that gridnav can process the arrow keys.
|
||||
|
||||
To move the focus to the next widget of the group use `LV_KEY_NEXT/PREV` or `lv_group_focus_next/prev()` or the `TAB` key on keyboard as usual.
|
||||
|
||||
To move the focus to the next widget of the group use `LV_KEY_NEXT/PREV` or `lv_group_focus_next/prev()` or the `TAB` key on keyboard as usual.
|
||||
|
||||
If the container is scrollable and the focused child is out of the view, gridnav will automatically scroll the child into view.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
To add the gridnav feature to an object use `lv_gridnav_add(cont, flags)`.
|
||||
|
||||
`flags` control the behavior of gridnav:
|
||||
- `LV_GRIDNAV_CTRL_NONE` Default settings
|
||||
- `LV_GRIDNAV_CTRL_ROLLOVER` If there is no next/previous object in a direction,
|
||||
the focus goes to the object in the next/previous row (on left/right keys) or first/last row (on up/down keys
|
||||
- `LV_GRIDNAV_CTRL_NONE` Default settings
|
||||
- `LV_GRIDNAV_CTRL_ROLLOVER` If there is no next/previous object in a direction,
|
||||
the focus goes to the object in the next/previous row (on left/right keys) or first/last row (on up/down keys
|
||||
- `LV_GRIDNAV_CTRL_SCROLL_FIRST` If an arrow is pressed and the focused object can be scrolled in that direction
|
||||
then it will be scrolled instead of going to the next/previous object. If there is no more room for scrolling the next/previous object will be focused normally
|
||||
then it will be scrolled instead of going to the next/previous object. If there is no more room for scrolling the next/previous object will be focused normally
|
||||
|
||||
`lv_gridnav_remove(cont)` Removes gridnav from an object.
|
||||
|
||||
## Focusable objects
|
||||
|
||||
An object needs to be clickable or click focusable (`LV_OBJ_FLAG_CLICKABLE` or `LV_OBJ_FLAG_CLICK_FOCUSABLE`)
|
||||
An object needs to be clickable or click focusable (`LV_OBJ_FLAG_CLICKABLE` or `LV_OBJ_FLAG_CLICK_FOCUSABLE`)
|
||||
and not hidden (`LV_OBJ_FLAG_HIDDEN`) to be focusable by gridnav.
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/others/imgfont.md
|
||||
```
|
||||
## Image font (imgfont)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/others/index.md
|
||||
```
|
||||
# Others
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
|
||||
snapshot
|
||||
monkey
|
||||
gridnav
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user