Initial

Dependencies:   mbed USBDevice USBJoystick_SIM

Revision:
3:86d3de520428
Parent:
1:5aa8e8b17eac
Child:
4:7ca148e9a75f
--- a/main.cpp	Sun Oct 07 14:41:04 2018 +0000
+++ b/main.cpp	Sun Oct 21 11:24:39 2018 +0000
@@ -157,7 +157,7 @@
             // if it's pressed, OR its bit into the state
             if (bs->pressed)
                 buttons |= bit;
-            pc.printf("Buttons: %d\n", buttons);
+            //pc.printf("Buttons: %d\n", buttons);
         }
     }
     
@@ -250,7 +250,7 @@
             // if it's pressed, OR its bit into the state
             if (hs->pressed)
                 hat |= bit;
-            pc.printf("Hat: %d\n", hat);
+            //pc.printf("Hat: %d\n", hat);
         }
         bit <<= 1;
     }
@@ -310,7 +310,7 @@
 #endif
     
     // return the new button list
-    pc.printf("Return Hat: %d", hat);
+    //pc.printf("Return Hat: %d", hat);
     return hat;
 }
  
@@ -329,14 +329,14 @@
     const int16_t l = 32767;
     const uint16_t m = 65535;
  
-    pc.printf("Hello World from Joystick!\n\r");
+    //pc.printf("Hello World from Joystick!\n\r");
  
     initButtons();
     initHat();
     
     heartbeat_start();
  
-    pc.printf("x, y, breaks, flaps, rudder, throttle, hat, buttons\n\n\r");
+    //pc.printf("x, y, breaks, flaps, rudder, throttle, hat, buttons\n\n\r");
  
     while (1) {
  
@@ -350,6 +350,7 @@
         buttons = readButtons();
         
         pc.printf("%d, %d, %d, %d, %d, %d, %d, %d\n\r", x, y, breaks, flaps, rudder, throttle, hat, buttons);
+        pc.printf("%d, %d\n\r", inX.read(), inY.read());
  
         joystick.update(x, y, breaks, flaps, rudder, throttle, hat, buttons);
         wait(0.01);