Skip to content

Commit

Permalink
chore(style): remove the trailing space from all source files (lvgl#3188
Browse files Browse the repository at this point in the history
)

Signed-off-by: Xiang Xiao <[email protected]>
  • Loading branch information
xiaoxiang781216 authored Mar 21, 2022
1 parent 46bd054 commit 4c4f954
Show file tree
Hide file tree
Showing 223 changed files with 1,719 additions and 1,719 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ LVGL是一个高度可裁剪、低资源占用、界面美观且易用的嵌入
*注意:资源占用情况与具体硬件平台、编译器等因素有关,上表中仅给出参考值*

### 已经支持的平台
LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求的微控制器均可运行LVGL。
LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求的微控制器均可运行LVGL。
如下仅列举其中一部分:

- NXP: Kinetis, LPC, iMX, iMX RT
Expand Down
14 changes: 7 additions & 7 deletions demos/README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -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
Expand All @@ -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.

Expand All @@ -68,27 +68,27 @@ 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.

<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">

Expand Down
26 changes: 13 additions & 13 deletions demos/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@

## 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`.

![LVGL benchmark running](https://github.com/lvgl/lvgl/tree/master/demos/benchmark/screenshot1.png?raw=true)


## 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.

Expand Down
4 changes: 2 additions & 2 deletions demos/keypad_encoder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

![Keypad and encoder navigation in LVGL embedded GUI library](screenshot1.gif)
Expand Down
4 changes: 2 additions & 2 deletions demos/music/README.md
Original file line number Diff line number Diff line change
@@ -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.


![Music player demo with LVGL embedded GUI library](https://github.com/lvgl/lvgl/tree/master/demos/music/screenshot1.gif?raw=true)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion demos/music/assets/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
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]
Expand Down
4 changes: 2 additions & 2 deletions demos/stress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

![Stress demo with LVGL embedded GUI library](https://github.com/lvgl/lvgl/tree/master/demos/stress/screenshot1.gif?raw=true)

Expand Down
Loading

0 comments on commit 4c4f954

Please sign in to comment.