Initial for Condor Simulator

Dependents:   USBJoystick_2 USBJoystick_NEW

Fork of USBJoystick by Wim Huiskamp

Revision:
6:cefcdf03ca0e
Parent:
5:fa0a30d0ef3d
--- a/USBJoystick.cpp	Sun Oct 07 14:37:43 2018 +0000
+++ b/USBJoystick.cpp	Sun Oct 21 11:24:24 2018 +0000
@@ -143,12 +143,12 @@
 
 void USBJoystick::_init()
 {
-    _x = 0;                                     // X-Axis
-    _y = 0;                                     // Y-Axis
-    _b = 0;                                     // Breaks
-    _f = 0;                                     // Wing Flaps
-    _r = 0;                                     // Rudder
-    _t = 0;                                     // Throttle
+    _x = 32767;                                     // X-Axis
+    _y = 32767;                                     // Y-Axis
+    _b = 32767;                                     // Breaks
+    _f = 32767;                                     // Wing Flaps
+    _r = 32767;                                     // Rudder
+    _t = 32767;                                     // Throttle
     _hat = 0x00;                                // POV Hat-Switches
     _buttons = 0x00000000;                      // Buttons
 }
@@ -173,8 +173,8 @@
 //                USAGE(1), 0x34,               // Ry
 //                USAGE(1), 0x35,               // Rz (Rudder on Usage Page 0x02)
 //                USAGE(1), 0x36                // Slider (Throttle on Usage Page 0x02)
-                LOGICAL_MINIMUM(2), 0x01, 0x80, // -32767 ; war 0, 0x00
-                LOGICAL_MAXIMUM(2), 0xff, 0x7f, // 32767 ; war 65536, 0xff 0xff
+                LOGICAL_MINIMUM(2), 0xff, 0x08, // war 0, 0x00, 0x80
+                LOGICAL_MAXIMUM(2), 0x00, 0x08, // war 65536, 0xff 0x7f
                 REPORT_SIZE(1), 0x10,
                 REPORT_COUNT(1), 0x04,
                 INPUT(1), 0x02,                 // Data, Variable, Absolute        
@@ -183,8 +183,8 @@
             USAGE_PAGE(1), 0x02,                // Simulation Controls
             USAGE(1), 0xBA,                     // Usage (Rudder)
             USAGE(1), 0xBB,                     // Usage (Throttle)
-            LOGICAL_MINIMUM(1), 0x00,           // 0
-            LOGICAL_MAXIMUM(2), 0xff, 0xff,     // 65536
+            LOGICAL_MINIMUM(2), 0xff, 0x08,     // 0
+            LOGICAL_MAXIMUM(2), 0x00, 0x08,     // 65536
             REPORT_SIZE(1), 0x10,
             REPORT_COUNT(1), 0x02,
             INPUT(1), 0x02,                     // Data, Variable, Absolute