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

提供: robot-jp wiki
ナビゲーションに移動検索に移動
9行目: 9行目:
 
|}
 
|}
  
 +
 +
 +
= Monkey =
 +
A simple monkey test. Use random input to stress test the application.
 +
 +
== Usage ==
 +
Enable <code>LV_USE_MONKEY</code> in <code>lv_conf.h</code>.
 +
 +
First configure monkey, use <code>lv_monkey_config_t</code> to define the configuration structure, set the <code>type</code> (check input devices for the supported types), and then set the range of <code>period_range</code> and <code>input_range</code>, the monkey will output random operations at random times within this range. Call <code>lv_monkey_create</code> to create monkey. Finally call <code>lv_monkey_set_enable(monkey, true)</code> to enable monkey.
 +
 +
If you want to pause the monkey, call <code>lv_monkey_set_enable(monkey, false)</code>. To delete the monkey, call <code>lv_monkey_del(monkey)</code>.
 +
 +
Note that <code>input_range</code> has different meanings in different <code>type</code>:
 +
 +
* <code>LV_INDEV_TYPE_POINTER</code> No effect, click randomly within the pixels of the screen resolution.
 +
* <code>LV_INDEV_TYPE_ENCODER</code> The minimum and maximum values ​​of <code>enc_diff</code>.
 +
* <code>LV_INDEV_TYPE_BUTTON</code> The minimum and maximum values ​​of <code>btn_id</code>. Use <code>lv_monkey_get_indev()</code> to get the input device, and use <code>lv_indev_set_button_points()</code> to map the key ID to the coordinates.
 +
* <code>LV_INDEV_TYPE_KEYPAD</code> No effect, Send random Keys.
  
  

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

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

英文 自動翻訳


Monkey

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

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