Open Red-Owl opened 2 weeks ago
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);
}
}
Carefully written Issues are more likely to be given priority. 丁寧に記述された報告は優先して対応される可能性が高くなります。
Environment ( 実行環境 )
Problem Description ( 問題の内容 )
freeze loop() ; FT6336U I2C single touch
Expected Behavior ( 期待される動作 )
Actual Behavior ( 実際の動作 )
Steps to reproduce ( 再現のための前提条件 )
// 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.