Commits

Anonymous committed 15dba9c

Fixed firmware update for Mustang III, IV and V. Changes by Jonathan
Underwood.

  • Participants
  • Parent commits f64900b

Comments (0)

Files changed (4)

+syntax: glob
+
+./plug/plug.pro.user
+./plug-build-desktop-*/*
+./tools/*
+./packages/*

File plug/mainwindow.cpp

     QString filename;
     int ret = 0;
 
-    QMessageBox::information(this, "Prepare", "Please power off the amplifier, then power it back on while holding \"Save\" button.<br>After pressing \"OK\" choose firmware file and then update will begin.<br>It will take about one minute. You will be notified when it's finished.");
+    QMessageBox::information(this, "Prepare", "Please power off the amplifier, then power it back on while holding down:<ul><li>The \"Save\" button (Mustang I and II)</li><li>The Data Wheel (Mustang III, IV and IV)</li></ul>After pressing \"OK\" choose firmware file and then update will begin.It will take about one minute. You will be notified when it's finished.");
 
     filename = QFileDialog::getOpenFileName(this, tr("Open..."), QDir::homePath(), tr("Mustang firmware (*.upd)"));
     if(filename.isEmpty())

File plug/mustang.cpp

             return ret;
 
         // get handle for the device
-        amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, USB_UPDATE_PID);
+        amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, OLD_USB_UPDATE_PID);
         if(amp_hand == NULL)
         {
-            libusb_exit(NULL);
-            return -100;
+	    amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, NEW_USB_UPDATE_PID);
+            if(amp_hand == NULL)
+	    {
+                libusb_exit(NULL);
+                return -100;
+	    }
         }
 
         // detach kernel driver

File plug/mustang.h

 
 // amp's VID and PID while in update mode
 #define USB_UPDATE_VID 0x1ed8
-#define USB_UPDATE_PID 0x0006
+#define OLD_USB_UPDATE_PID 0x0006  //Mustang I and II
+#define NEW_USB_UPDATE_PID 0x0007  //Mustang III, IV, V
 
 // for USB communication
 #define TMOUT 500