forked from xuos/xiuos
fit touch postion for lvgl
This commit is contained in:
@@ -268,7 +268,7 @@ static bool touchpad_is_pressed(void)
|
||||
ret = PrivRead(touch_fd, &touch_data, 1);
|
||||
if(ret && touch_data.x >= 0 && touch_data.x < MY_INDEV_X && touch_data.y >= 0 && touch_data.y < MY_INDEV_Y)
|
||||
{
|
||||
// printf("touch x %d touch y %d\n",touch_data.x,touch_data.y);
|
||||
printf("touch x %d touch y %d\n",touch_data.x,touch_data.y);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples/examples.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra/extra.mk
|
||||
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core/lv_core.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/lv_draw.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font/lv_font.mk
|
||||
|
||||
@@ -292,7 +292,7 @@ static bool touchpad_is_pressed(struct TouchDataStandard* touch_data_ptr)
|
||||
press_failed_cnt = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
printf("lv_touch:%d,%d\n",touch_data_ptr->x,touch_data_ptr->y);
|
||||
press_failed_cnt++;
|
||||
if (press_failed_cnt >= PRESS_FAILED_LIMIT) {
|
||||
PrivClose(touch_fd);
|
||||
|
||||
Reference in New Issue
Block a user