summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/joystick12/joystick12.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'peripheral/libupm/src/joystick12/joystick12.cxx')
-rw-r--r--peripheral/libupm/src/joystick12/joystick12.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/peripheral/libupm/src/joystick12/joystick12.cxx b/peripheral/libupm/src/joystick12/joystick12.cxx
index 4f7245b..b70557c 100644
--- a/peripheral/libupm/src/joystick12/joystick12.cxx
+++ b/peripheral/libupm/src/joystick12/joystick12.cxx
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <functional>
#include <string.h>
-#include "joystick12.hpp"
+#include "joystick12.h"
using namespace upm;
@@ -75,7 +75,6 @@ Joystick12::~Joystick12() {
float Joystick12::getXInput() {
float in = mraa_aio_read (m_joystickCtxX);
- if (in == -1.0) return -1;
if (in < X_left) return -1;
if (in < X_center) return -(X_center - in) / (X_center - X_left);
if (in == X_center) return 0;
@@ -87,7 +86,6 @@ float Joystick12::getXInput() {
float Joystick12::getYInput() {
float in = mraa_aio_read (m_joystickCtxY);
- if (in == -1.0) return -1;
if (in < Y_left) return -1;
if (in < Y_center) return -(Y_center - in) / (Y_center - Y_left);
if (in == Y_center) return 0;