From 94463a490c039d79a7a5fcd642c0ed2411a509cd Mon Sep 17 00:00:00 2001 From: Orangerot Date: Mon, 13 Jan 2025 20:42:13 +0100 Subject: [PATCH] fix: calibrate input ranges for gyroscope (better but left/right still not good) --- lib/utils/esense_input.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/utils/esense_input.dart b/lib/utils/esense_input.dart index 6eb4222..b738664 100644 --- a/lib/utils/esense_input.dart +++ b/lib/utils/esense_input.dart @@ -139,10 +139,10 @@ class ESenseInput { } InputDirection getInputDirection(ArrowDirection expect) { - inputDirection.up = z > 270 && z < 340; - inputDirection.down = z > 40 && z < 180; - inputDirection.left = y > 40 && y < 180; - inputDirection.right = y > 270 && y < 340; + inputDirection.up = z > 180 && z < 340; + inputDirection.down = z > 20 && z < 180; + inputDirection.left = y > 0 && y < 180; + inputDirection.right = y > 180 && y < 360; if (expect == ArrowDirection.up && inputDirection.up || expect == ArrowDirection.down && inputDirection.down) {