Multi screen support, with dyn alignment (#2801)

This commit is contained in:
Totoo 2025-10-03 19:10:10 +02:00 committed by GitHub
parent 23cabb8b8a
commit 371b6b5079
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
161 changed files with 4042 additions and 4157 deletions

View file

@ -66,8 +66,11 @@ Metrics calculate_metrics(const Frame& frame) {
}
ui::Point Calibration::translate(const DigitizerPoint& p) const {
static constexpr range_t<int32_t> x_range{0, 240 - 1};
static constexpr range_t<int32_t> y_range{0, 320 - 1};
// static constexpr range_t<int32_t> x_range{0, 240 - 1};
// static constexpr range_t<int32_t> y_range{0, 320 - 1};
static range_t<int32_t> x_range{0, screen_width - 1};
static range_t<int32_t> y_range{0, screen_height - 1};
const int32_t x = (a * p.x + b * p.y + c) / k;
const int32_t y = (d * p.x + e * p.y + f) / k;
@ -133,4 +136,4 @@ ui::Point Manager::filtered_point() const {
return persistent_memory::touch_calibration().translate({filter_x.value(), filter_y.value()});
}
} /* namespace touch */
} /* namespace touch */