「App:Library:LVGL:docs:Others:Monkey」の版間の差分

提供: robot-jp wiki
ナビゲーションに移動検索に移動
12行目: 12行目:
  
 
= Monkey =
 
= Monkey =
 +
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 
A simple monkey test. Use random input to stress test the application.
 
A simple monkey test. Use random input to stress test the application.
 +
|
 +
|}
 +
:[[App:Library:LVGL:docs:Others|戻る : Previous]]
 +
  
 
== Usage ==
 
== Usage ==
 +
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 
Enable <code style="color: #bb0000;">LV_USE_MONKEY</code> in <code style="color: #bb0000;">lv_conf.h</code>.
 
Enable <code style="color: #bb0000;">LV_USE_MONKEY</code> in <code style="color: #bb0000;">lv_conf.h</code>.
  
28行目: 42行目:
 
* <code style="color: #bb0000;">LV_INDEV_TYPE_BUTTON</code> The minimum and maximum values ​​of <code style="color: #bb0000;">btn_id</code>. Use <code style="color: #bb0000;">lv_monkey_get_indev()</code> to get the input device, and use <code style="color: #bb0000;">lv_indev_set_button_points()</code> to map the key ID to the coordinates.
 
* <code style="color: #bb0000;">LV_INDEV_TYPE_BUTTON</code> The minimum and maximum values ​​of <code style="color: #bb0000;">btn_id</code>. Use <code style="color: #bb0000;">lv_monkey_get_indev()</code> to get the input device, and use <code style="color: #bb0000;">lv_indev_set_button_points()</code> to map the key ID to the coordinates.
 
* <code style="color: #bb0000;">LV_INDEV_TYPE_KEYPAD</code> No effect, Send random [https://docs.lvgl.io/8.2/overview/indev.html '''Keys'''].
 
* <code style="color: #bb0000;">LV_INDEV_TYPE_KEYPAD</code> No effect, Send random [https://docs.lvgl.io/8.2/overview/indev.html '''Keys'''].
 
+
|
 +
|}
 +
:[[App:Library:LVGL:docs:Others|戻る : Previous]]
  
  
56行目: 72行目:
  
 
== API ==
 
== API ==
 +
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 
Typedefs
 
Typedefs
  
126行目: 147行目:
 
: <span style="background-color: #eeeeee;">int32_t max</span>
 
: <span style="background-color: #eeeeee;">int32_t max</span>
 
: <span style="background-color: #eeeeee;">struct [https://docs.lvgl.io/8.2/others/monkey.html#_CPPv418lv_monkey_config_t '''lv_monkey_config_t''']::[anonymous] input_range</span>
 
: <span style="background-color: #eeeeee;">struct [https://docs.lvgl.io/8.2/others/monkey.html#_CPPv418lv_monkey_config_t '''lv_monkey_config_t''']::[anonymous] input_range</span>
 
+
|
 
+
|}
----
 
 
:[[App:Library:LVGL:docs:Others|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Others|戻る : Previous]]

2022年6月22日 (水) 21:05時点における版

https://docs.lvgl.io/8.2/others/monkey.html

英文 自動翻訳


Monkey

英文 自動翻訳

A simple monkey test. Use random input to stress test the application.

戻る : Previous


Usage

英文 自動翻訳

Enable LV_USE_MONKEY in lv_conf.h.


First configure monkey, use lv_monkey_config_t to define the configuration structure, set the type (check input devices for the supported types), and then set the range of period_range and input_range, the monkey will output random operations at random times within this range. Call lv_monkey_create to create monkey. Finally call lv_monkey_set_enable(monkey, true) to enable monkey.

If you want to pause the monkey, call lv_monkey_set_enable(monkey, false). To delete the monkey, call lv_monkey_del(monkey).

Note that input_range has different meanings in different type:

  • LV_INDEV_TYPE_POINTER No effect, click randomly within the pixels of the screen resolution.
  • LV_INDEV_TYPE_ENCODER The minimum and maximum values ​​of enc_diff.
  • LV_INDEV_TYPE_BUTTON The minimum and maximum values ​​of btn_id. Use lv_monkey_get_indev() to get the input device, and use lv_indev_set_button_points() to map the key ID to the coordinates.
  • LV_INDEV_TYPE_KEYPAD No effect, Send random Keys.
戻る : Previous


Example

英文 自動翻訳

Touchpad monkey example

lin=https://docs.lvgl.io/8.2/others/monkey.html

Encoder monkey example

lin=https://docs.lvgl.io/8.2/others/monkey.html

Button monkey example

lin=https://docs.lvgl.io/8.2/others/monkey.html

API

英文 自動翻訳

Typedefs

typedef struct _lv_monkey lv_monkey_t

Functions

void lv_monkey_config_init(lv_monkey_config_t *config)

Initialize a monkey config with default values
Parameters
config -- pointer to 'lv_monkey_config_t' variable to initialize

lv_monkey_t *lv_monkey_create(const lv_monkey_config_t *config)

Create monkey for test
Parameters
config -- pointer to 'lv_monkey_config_t' variable
Returns
pointer to the created monkey

lv_indev_t *lv_monkey_get_indev(lv_monkey_t *monkey)

Get monkey input device
Parameters
monkey -- pointer to a monkey
Returns
pointer to the input device

void lv_monkey_set_enable(lv_monkey_t *monkey, bool en)

Enable monkey
Parameters
  • monkey -- pointer to a monkey
  • en -- set to true to enable

bool lv_monkey_get_enable(lv_monkey_t *monkey)

Get whether monkey is enabled
Parameters
monkey -- pointer to a monkey
Returns
return true if monkey enabled

void lv_monkey_set_user_data(lv_monkey_t *monkey, void *user_data)

Set the user_data field of the monkey
Parameters
  • monkey -- pointer to a monkey
  • user_data -- pointer to the new user_data.

void *lv_monkey_get_user_data(lv_monkey_t *monkey)

Get the user_data field of the monkey
Parameters
monkey -- pointer to a monkey
Returns
the pointer to the user_data of the monkey

void lv_monkey_del(lv_monkey_t *monkey)

Delete monkey
Parameters
monkey -- pointer to monkey

struct lv_monkey_config_t

Public Members
lv_indev_type_t type
< Input device type Monkey execution period
uint32_t min
uint32_t max
ruct lv_monkey_config_t::[anonymous] period_range</nowiki>
The range of input value
int32_t min
int32_t max
struct lv_monkey_config_t::[anonymous] input_range
戻る : Previous