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

Adjust default touch calibration for Core2 #469

Merged
merged 2 commits into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading