diff options
author | Orangerot <purple@orangerot.dev> | 2025-01-13 20:42:13 +0100 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2025-01-13 20:42:13 +0100 |
commit | 94463a490c039d79a7a5fcd642c0ed2411a509cd (patch) | |
tree | 122dd7d606dfddd15e60145638824dd067d0559d /lib/utils | |
parent | 4c1d029216c29f786f12fa278b9dd7bf39129235 (diff) |
fix: calibrate input ranges for gyroscope (better but left/right still not good)
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/esense_input.dart | 8 |
1 files 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) { |