Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tft.getTouch(&touchX, &touchY); freeze loop() #580

Closed
Red-Owl opened this issue Jun 18, 2024 · 3 comments
Closed

tft.getTouch(&touchX, &touchY); freeze loop() #580

Red-Owl opened this issue Jun 18, 2024 · 3 comments
Labels
stale Inactive issues

Comments

@Red-Owl
Copy link

Red-Owl commented Jun 18, 2024

Carefully written Issues are more likely to be given priority.
丁寧に記述された報告は優先して対応される可能性が高くなります。

Environment ( 実行環境 )

  • MCU or Board name: wt32-sc01-plus
  • Panel Driver IC: ST7796UI
  • Bus type: Parallel8
  • LovyanGFX version: LovyanGFX@1.1.12
  • FrameWork version: ArduinoESP32
  • Build Environment: PlatformIO
  • Operating System: Windows

Problem Description ( 問題の内容 )

freeze loop()
; FT6336U I2C single touch

Expected Behavior ( 期待される動作 )

Actual Behavior ( 実際の動作 )

Steps to reproduce ( 再現のための前提条件 )

  1. step1 system works
  2. touch
  3. freeze

// If possible, attach a picture of your setup/wiring here.

Code to reproduce this issue ( 再現させるためのコード )

Please submit complete source code that can reproduce your problem.

**void my_touchpad_read(lv_indev_drv_t indev_driver, lv_indev_data_t data){
uint16_t touchX, touchY;
boolean touched = tft.getTouch(&touchX, &touchY);
if (!touched){
data->state = LV_INDEV_STATE_REL;
}else{
data->state = LV_INDEV_STATE_PR;
data->point.x = touchX;
data->point.y = touchY;
}

// If your code is longer than 30 lines, GIST is preferred.

@tobozo
Copy link
Collaborator

tobozo commented Jun 18, 2024

hi,

LovyanGFX version: LovyanGFX@1.1.12

please upgrade to 1.1.16, then try with this code:

void setup()
{
  tft.init();
}

void loop()
{
  static int count = 0;
  int32_t x, y;
  if (tft.getTouch(&x, &y)) {
    count++;
    tft.fillRect(x-2, y-2, 5, 5, count*7);
  }
}

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Inactive issues label Jul 18, 2024
Copy link

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive issues
Projects
None yet
Development

No branches or pull requests

2 participants