diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2021-07-15 11:11:27 (GMT) |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2021-07-15 11:11:27 (GMT) |
| commit | fe64176e7b8a0a7a9df733701d08762b60c2511f (patch) | |
| tree | d5ef31d626486c85fd046bbeeb22af845315079d /src/displayapp/LittleVgl.cpp | |
| parent | 57b339707861c5688f5d432f1506a99df6bb0fce (diff) | |
New touch handler, with issues
Diffstat (limited to 'src/displayapp/LittleVgl.cpp')
| -rw-r--r-- | src/displayapp/LittleVgl.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/displayapp/LittleVgl.cpp b/src/displayapp/LittleVgl.cpp index c069afa..d0c6161 100644 --- a/src/displayapp/LittleVgl.cpp +++ b/src/displayapp/LittleVgl.cpp @@ -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; } |
