New touch handler, with issues
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user