graphics/input: Adjust input tool priority and sampling rate

Align to monkey's priority, with a sampling rate similar to a real touch.

Signed-off-by: liuchan3 <liuchan3@xiaomi.com>
This commit is contained in:
liuchan3
2025-06-13 16:39:52 +08:00
committed by Xiang Xiao
parent 6f93e401aa
commit fdf6f57d6c
2 changed files with 2 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ config GRAPHICS_INPUT_TOOL_STACKSIZE
config GRAPHICS_INPUT_TOOL_PRIORITY
int "input priority"
default 100
default 110
---help---
The priority of the input task.

View File

@@ -293,7 +293,7 @@ static int input_gen_motion(input_gen_ctx_t ctx,
{
uint32_t elapsed = input_gen_tick_elapsed(input_gen_tick_get(), start);
ret = input_gen_write_motion(dev->fd, fingers, nfingers, elapsed);
if (ret == -EAGAIN && usleep(1000) < 0)
if (ret == -EAGAIN && usleep(8 * 1000) < 0)
{
nwarn("WARNING: Maybe interrupted by signal\n");
input_gen_ungrab(dev);