1
0
mirror of https://github.com/limyz/573controller synced 2024-11-23 22:51:00 +01:00

Fixed deadzone axis bug

This commit is contained in:
limyz 2020-04-28 06:34:04 +08:00
parent d197f06628
commit 4acdc52ae2
2 changed files with 4 additions and 4 deletions

View File

@ -123,10 +123,10 @@ void loop() {
} }
if (turnTable.read() >= 360) { if (turnTable.read() >= 360) {
turnTable.write(-360); turnTable.write(-359);
} }
else if (turnTable.read() <= -360) { else if (turnTable.read() <= -360) {
turnTable.write(360); turnTable.write(359);
} }
Joystick.setXAxis(turnTable.read()); Joystick.setXAxis(turnTable.read());

View File

@ -125,10 +125,10 @@ void loop() {
} }
if (turnTable.read() >= 360) { if (turnTable.read() >= 360) {
turnTable.write(-360); turnTable.write(-359);
} }
else if (turnTable.read() <= -360) { else if (turnTable.read() <= -360) {
turnTable.write(360); turnTable.write(359);
} }
Joystick.setXAxis(turnTable.read()); Joystick.setXAxis(turnTable.read());