docs(misc): fix multiple formatting errors and typos (#8738)

This commit is contained in:
Victor Wheeler
2025-09-09 11:29:41 -06:00
committed by GitHub
parent 642a4641d4
commit b75c562387
8 changed files with 56 additions and 26 deletions
+4 -5
View File
@@ -962,9 +962,8 @@ table.docutils th p {
}
/*-------------------------------------------------------------------------
* The `lv-api-...` classes do not select anything at this writing (29-Mar-2025).
*-------------------------------------------------------------------------
*/
* API Pages
*-------------------------------------------------------------------------*/
.lv-api-expansion-button {
padding: 4px;
}
@@ -1134,14 +1133,14 @@ body[data-theme="dark"] .highlight .p {
margin-top: 4rem;
}
.glossary > .dt {
.glossary > dt {
font-weight: 800 !important;
font-size: 1.25rem;
line-height: 1.25;
margin-top: 0;
}
.glossary > .dt:first-child {
.glossary > dt:first-child {
margin-top: 2rem;
}
@@ -459,14 +459,15 @@ Specific Widget Types
To learn how to bind subjects to Arcs, Labels, Sliders, etc. visit the "Data binding"
section of the given widget's documentation. For example: :ref:`Data binding for lv_label <lv_label_data_binding>`.
Change Subject on Event
-----------------------
It's a common requirement to update a subject based on a user action (trigger).
It's a common requirement to update a Subject based on a user action (trigger).
To simplify this, *subject set* and *increment* actions can be attached directly to any widget.
Internally, these are implemented as special event callbacks.
Note: these callbacks are **not** automatically removed when a subject is deinited.
Note: these callbacks are **not** automatically removed when a subject is de-initialized.
Increment
~~~~~~~~~
+32 -2
View File
@@ -8,19 +8,26 @@ The System Monitor module provides real-time monitoring of system performance
metrics directly on your display. It supports both performance monitoring
(CPU usage and FPS) and memory monitoring (used memory and fragmentation).
Dependencies
************
- Requires ``LV_USE_LABEL = 1`` in lv_conf.h
- Requires ``LV_USE_OBSERVER = 1`` in lv_conf.h
- Requires ``LV_USE_SYSMON = 1`` in lv_conf.h
.. _sysmon_usage:
Usage
*****
Configuration
--------------
Enable in ``lv_conf.h``:
.. code-block:: c
@@ -40,8 +47,10 @@ Enable in ``lv_conf.h``:
/* Optional: log to console instead of screen */
#define LV_USE_PERF_MONITOR_LOG_MODE 0
Creating Monitors
-----------------
.. code-block:: c
/* Create generic monitor */
@@ -53,9 +62,12 @@ Creating Monitors
/* Create memory monitor */
lv_sysmon_show_memory(NULL);
Performance Monitor
-------------------
Tracks:
- FPS (Frames Per Second)
- CPU usage (%)
- Render time (ms)
@@ -63,15 +75,19 @@ Tracks:
- Self CPU usage (%) if enabled
Display format:
.. code-block::
.. code-block:: text
32 FPS, 45% CPU
8 ms
Where:
- Line 1: FPS, Total CPU%
- Line 2: Total time (Render | Flush)
Pause and Resume
****************
@@ -79,21 +95,27 @@ Pause and Resume
:cpp:expr:`lv_sysmon_performance_resume(disp)` resumes the perf monitor.
Memory Monitor
--------------
Displays:
- Current memory usage (kB and %)
- Peak memory usage (kB)
- Fragmentation (%)
Display format:
.. code-block::
.. code-block:: text
24.8 kB (76%)
32.4 kB max, 18% frag.
Positioning
-----------
Configure positions in lv_conf.h:
.. code-block:: c
@@ -105,17 +127,23 @@ Configure positions in lv_conf.h:
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
Implementation Details
**********************
Initialization
--------------
Maintains:
- Global memory monitor (``sysmon_mem``)
- Per-display performance structures
Performance Measurement
-----------------------
Event-based collection:
+----------------------+--------------------------------+
@@ -132,8 +160,10 @@ Event-based collection:
| LV_EVENT_FLUSH_* | Measure flush operations |
+----------------------+--------------------------------+
Timers
------
- Performance: ``perf_update_timer_cb``
- Memory: ``mem_update_timer_cb``
- Default period: 300ms (``LV_SYSMON_REFR_PERIOD_DEF``)
@@ -395,8 +395,8 @@ complex features can be used via styles.
.. _coord_translation:
Translation
***********
Coordinate Translation
**********************
Let's say the there are 3 buttons next to each other. Their position is
set as described above. Now you want to move a button up a little when
@@ -447,17 +447,17 @@ work as expected. Translations can be used to solve this:
lv_obj_add_style(btn3, &style_normal, LV_STATE_DEFAULT);
lv_obj_add_style(btn3, &style_pressed, LV_STATE_PRESSED);
Translation is applied from the current position of the Widget.
Coordinate translation is applied from the current position of the Widget.
Percentage values can be used in translations as well. The percentage is
Percentage values can be used in coordinate translations as well. The percentage is
relative to the size of the Widget (and not to the size of the parent).
For example :cpp:expr:`lv_pct(50)` will move the Widget with half of its
width/height.
The translation is applied after the layouts are calculated. Therefore,
The coordinate translation is applied after the layouts are calculated. Therefore,
even laid out Widgets' position can be translated.
The translation actually moves the Widget. That means it makes the
The coordinate translation actually moves the Widget. That means it makes the
scrollbars and :c:macro:`LV_SIZE_CONTENT` sized Widgets react to the position
change.
@@ -49,7 +49,7 @@ Basic configuration:
- Select NXP PXP engine in "lv_conf.h": Set :c:macro:`LV_USE_PXP` to `1`.
- In order to use PXP as a draw unit, select in "lv_conf.h": Set :c:macro:`LV_USE_DRAW_PXP` to `1`.
- In order to use PXP to rotate the screen, select in "lv_conf.h": Set :c:macro:`LV_USE_ROTATE_PXP` to `1`.
- Enable PXP asserts in "lv_conf.h": Set :c:macro: `LV_USE_PXP_ASSERT` to `1`.
- Enable PXP asserts in "lv_conf.h": Set :c:macro:`LV_USE_PXP_ASSERT` to `1`.
There are few PXP assertions that can stop the program execution in case the
:c:macro:`LV_ASSERT_HANDLER` is set to `while(1);` (Halt by default). Else,
there will be logged just an error message via `LV_LOG_ERROR`.
@@ -220,10 +220,10 @@ Basic configuration:
- Select NXP VGLite engine in "lv_conf.h": Set :c:macro:`LV_USE_DRAW_VGLITE` to
`1`. :c:macro:`SDK_OS_FREE_RTOS` symbol needs to be defined so that FreeRTOS
driver osal implementation will be enabled.
- Enable VGLite asserts in "lv_conf.h": Set :c:macro: `LV_USE_VGLITE_ASSERT` to
- Enable VGLite asserts in "lv_conf.h": Set :c:macro:`LV_USE_VGLITE_ASSERT` to
`1`.
VGLite assertions will verify the driver API status code and in any error, it
can stop the program execution in case the :c:macro: `LV_ASSERT_HANDLER` is set
can stop the program execution in case the :c:macro:`LV_ASSERT_HANDLER` is set
to `while(1);` (Halt by default). Else, there will be logged just an error
message via `LV_LOG_ERROR`.
@@ -307,7 +307,7 @@ Advanced configuration:
^^^^^^^^^^^^^^^^^^^^^^^
- Enable VGLite blit split in "lv_conf.h":
Set :c:macro: `LV_USE_VGLITE_BLIT_SPLIT` to `1`.
Set :c:macro:`LV_USE_VGLITE_BLIT_SPLIT` to `1`.
Enabling the blit split workaround will mitigate any quality degradation issue
on screen's dimension > 352 pixels.
@@ -322,7 +322,7 @@ Advanced configuration:
the blit split.
- Enable VGLite draw task synchronously in "lv_conf.h":
Set :c:macro: `LV_USE_VGLITE_DRAW_ASYNC` to `1`.
Set :c:macro:`LV_USE_VGLITE_DRAW_ASYNC` to `1`.
Multiple draw tasks can be queued and flushed them once to the GPU based on
the GPU idle status. If GPU is busy, the task will be queued, and the VGLite
dispatcher will ask for a new available task. If GPU is idle, the queue with
@@ -426,9 +426,9 @@ Basic configuration:
- Select NXP G2D engine in "lv_conf.h": Set :c:macro:`LV_USE_G2D` to `1`.
- In order to use G2D as a draw unit, select in "lv_conf.h": Set :c:macro:`LV_USE_DRAW_G2D` to `1`.
- Enable G2D asserts in "lv_conf.h": Set :c:macro: `LV_USE_G2D_ASSERT` to `1`.
- Enable G2D asserts in "lv_conf.h": Set :c:macro:`LV_USE_G2D_ASSERT` to `1`.
There are few G2D assertions that can stop the program execution in case the
:c:macro: `LV_ASSERT_HANDLER` is set to `while(1);` (Halt by default). Else,
:c:macro:`LV_ASSERT_HANDLER` is set to `while(1);` (Halt by default). Else,
there will be logged just an error message via `LV_LOG_ERROR`.
Basic initialization:
@@ -201,8 +201,8 @@ EVE Register Access
-------------------
The functions :cpp:func:`lv_draw_eve_memread8`, :cpp:func:`lv_draw_eve_memread16`, :cpp:func:`lv_draw_eve_memread32`,
:cpp:func:`lv_draw_eve_memwrite8`, :cpp:func:`lv_draw_eve_memwrite16`, are :cpp:func:`lv_draw_eve_memwrite32`
available if needed. They are wrappers around ``EVE_memRead8``, etc.
:cpp:func:`lv_draw_eve_memwrite8`, :cpp:func:`lv_draw_eve_memwrite16`, and :cpp:func:`lv_draw_eve_memwrite32`
are available if needed. They are wrappers around ``EVE_memRead8()``, etc.
Register definitions and other EVE enumerations are available when you include
``lvgl.h`` under the prefix namespace ``LV_EVE_``. I.e., ``REG_ID`` is available
+1 -1
View File
@@ -44,7 +44,7 @@ Example
/* Release the DOM tree */
lv_svg_node_delete(svg_doc);
`lv_image` also supports SVG images, For example:
`lv_image` also supports SVG images. For example:
.. code-block:: c
+1 -1
View File
@@ -143,7 +143,7 @@ value directly. Note that this is a two-way binding (Subject <===> Widget) so a
user's direct interaction with the Drop-Down Widget updates the Subject's value and
vice versa.
It support only integer subjects.
It support only integer Subjects.
- :cpp:expr:`lv_dropdown_bind_value(dropdown, &subject)`