mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-20 06:29:02 +00:00
Multi screen support, with dyn alignment (#2801)
This commit is contained in:
@@ -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 */
|
||||
Reference in New Issue
Block a user