Browse Source

Add Saitek X52 Pro VID/PID

Thomas Buck 8 years ago
parent
commit
52ecdee2aa
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      x52.cpp

+ 10
- 1
x52.cpp View File

@@ -25,6 +25,7 @@ void X52::initialize() {
25 25
         return;
26 26
     }
27 27
 
28
+    // Get the USB device descriptor so we can check for a valid PID/VID
28 29
     uint8_t buf[sizeof (USB_DEVICE_DESCRIPTOR)];
29 30
     USB_DEVICE_DESCRIPTOR* udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR*>(buf);
30 31
     uint8_t ret = usb->getDevDescr(hid->GetAddress(), 0, sizeof(USB_DEVICE_DESCRIPTOR), (uint8_t*)buf);
@@ -45,7 +46,11 @@ void X52::initialize() {
45 46
         Serial.println(pid, DEC);
46 47
 #endif
47 48
 
48
-    if ((vid == 1699) && (pid == 597)) {
49
+    if ((vid == 0x06A3) && (pid == 0x0255)) {
50
+        // Saitek X52
51
+        ready = 1;
52
+    } else if ((vid == 0x06A3) && (pid == 0x0762)) {
53
+        // Saitek X52 Pro
49 54
         ready = 1;
50 55
     } else {
51 56
 #ifdef DEBUG_OUTPUT
@@ -138,6 +143,10 @@ void X52::setMFDText(uint8_t line, const char* text) {
138 143
     };
139 144
 
140 145
     if (line >= 3) {
146
+#ifdef DEBUG_OUTPUT
147
+        Serial.print("Invalid line: ");
148
+        Serial.println(line, DEC);
149
+#endif
141 150
         return;
142 151
     }
143 152
 

Loading…
Cancel
Save