Skip to content

Commit

Permalink
Merge pull request #469 from toyoshim/master
Browse files Browse the repository at this point in the history
Adjust default touch calibration for Core2
  • Loading branch information
lovyan03 authored Dec 27, 2023
2 parents e8924dc + e0fa7fa commit 529594f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lgfx/v1_autodetect/LGFX_AutoDetect_ESP32_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,7 @@ namespace lgfx
result->board = board_t::board_M5Tough;
p->light(new Light_M5Tough());
t = new lgfx::Touch_M5Tough();
p->touch(t);
}
else
{
Expand All @@ -2214,10 +2215,12 @@ namespace lgfx
cfg.y_min = 0;
cfg.y_max = 279;
t->config(cfg);
p->touch(t);
// Touch 登録時に計算される標準変換式を上書きする;
// 標準式では表示領域外の仮想ボタンの高さ分だけずれてしまう;
float affine[6] = { 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f };
p->setCalibrateAffine(affine);
}
p->touch(t);
auto cfg = t->config();
cfg.pin_int = GPIO_NUM_39; // INT pin number
cfg.pin_sda = axp_i2c_sda; // I2C SDA pin number
Expand Down

0 comments on commit 529594f

Please sign in to comment.