New touch handler, with issues

This commit is contained in:
Riku Isokoski
2021-07-15 14:11:27 +03:00
parent 57b3397078
commit fe64176e7b
21 changed files with 230 additions and 102 deletions

View File

@@ -166,18 +166,17 @@ void LittleVgl::FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
lv_disp_flush_ready(&disp_drv);
}
void LittleVgl::SetNewTapEvent(uint16_t x, uint16_t y) {
void LittleVgl::SetNewTapEvent(uint16_t x, uint16_t y, bool contact) {
tap_x = x;
tap_y = y;
tapped = true;
tapped = contact;
}
bool LittleVgl::GetTouchPadInfo(lv_indev_data_t* ptr) {
ptr->point.x = tap_x;
ptr->point.y = tap_y;
if (tapped) {
ptr->point.x = tap_x;
ptr->point.y = tap_y;
ptr->state = LV_INDEV_STATE_PR;
tapped = false;
} else {
ptr->state = LV_INDEV_STATE_REL;
}