Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Touch: Adjust thresholds and parameters for new scan.
Browse files Browse the repository at this point in the history
  • Loading branch information
jboone committed Jul 28, 2016
1 parent dd2097a commit 16a6d7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions firmware/application/touch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ class Manager {
TouchDetected,
};

static constexpr float r_touch_threshold = 0x1000;
static constexpr float r_touch_threshold = 640;
static constexpr size_t touch_count_threshold { 3 };
static constexpr uint32_t touch_stable_bound { 16 };
static constexpr uint32_t touch_stable_bound { 8 };

// Ensure filter length is equal or less than touch_count_threshold,
// or coordinates from the last touch will be in the initial averages.
Expand Down
2 changes: 1 addition & 1 deletion firmware/application/ui_touch_calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void TouchCalibrationView::on_frame_sync() {
const auto x = metrics.x * 1024;
const auto y = metrics.y * 1024;

if( metrics.r < 1000.0f ) {
if( metrics.r < 640.0f ) {
if( samples_count > 0 ) {
average.x = ((average.x * 7) + x) / 8;
average.y = ((average.y * 7) + y) / 8;
Expand Down

0 comments on commit 16a6d7e

Please sign in to comment.