acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

monkey.md (1445B)

      1 ```eval_rst
      2 .. include:: /header.rst
      3 :github_url: |github_link_base|/others/monkey.md
      4 ```
      5 # Monkey
      6 
      7 A simple monkey test. Use random input to stress test the application.
      8 
      9 ## Usage
     10 
     11 Enable `LV_USE_MONKEY` in `lv_conf.h`.
     12 
     13 First configure monkey, use `lv_monkey_config_t` to define the configuration structure, set the `type` (check [input devices](/overview/indev) 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.
     14 
     15 If you want to pause the monkey, call `lv_monkey_set_enable(monkey, false)`. To delete the monkey, call `lv_monkey_del(monkey)`.
     16 
     17 Note that `input_range` has different meanings in different `type`:
     18 
     19 - `LV_INDEV_TYPE_POINTER` No effect, click randomly within the pixels of the screen resolution.
     20 - `LV_INDEV_TYPE_ENCODER` The minimum and maximum values ​​of `enc_diff`.
     21 - `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.
     22 - `LV_INDEV_TYPE_KEYPAD` No effect, Send random [Keys](/overview/indev).
     23 
     24 ## Example
     25 
     26 ```eval_rst
     27 
     28 .. include:: ../../examples/others/monkey/index.rst
     29 
     30 ```
     31 ## API
     32 
     33 
     34 ```eval_rst
     35 
     36 .. doxygenfile:: lv_monkey.h
     37   :project: lvgl
     38 
     39 ```