fix: calibrate input ranges for gyroscope (better but left/right still not good)
This commit is contained in:
parent
4c1d029216
commit
94463a490c
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue