Skip to content

Commit 1f179e9

Browse files
author
piorekf
committed
Fixed firmware update for Mustang III, IV and V. Changes by Jonathan
Underwood.
1 parent ea0c2b9 commit 1f179e9

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.hgignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
syntax: glob
2+
3+
./plug/plug.pro.user
4+
./plug-build-desktop-*/*
5+
./tools/*
6+
./packages/*

plug/mainwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ void MainWindow::update_firmware()
664664
QString filename;
665665
int ret = 0;
666666

667-
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.");
667+
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.");
668668

669669
filename = QFileDialog::getOpenFileName(this, tr("Open..."), QDir::homePath(), tr("Mustang firmware (*.upd)"));
670670
if(filename.isEmpty())

plug/mustang.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,11 +1286,15 @@ int Mustang::update(char *filename)
12861286
return ret;
12871287

12881288
// get handle for the device
1289-
amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, USB_UPDATE_PID);
1289+
amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, OLD_USB_UPDATE_PID);
12901290
if(amp_hand == NULL)
12911291
{
1292-
libusb_exit(NULL);
1293-
return -100;
1292+
amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, NEW_USB_UPDATE_PID);
1293+
if(amp_hand == NULL)
1294+
{
1295+
libusb_exit(NULL);
1296+
return -100;
1297+
}
12941298
}
12951299

12961300
// detach kernel driver

plug/mustang.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
// amp's VID and PID while in update mode
1919
#define USB_UPDATE_VID 0x1ed8
20-
#define USB_UPDATE_PID 0x0006
20+
#define OLD_USB_UPDATE_PID 0x0006 //Mustang I and II
21+
#define NEW_USB_UPDATE_PID 0x0007 //Mustang III, IV, V
2122

2223
// for USB communication
2324
#define TMOUT 500

0 commit comments

Comments
 (0)