You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
showMessage(QCoreApplication::translate("","No Hantek oscilloscope found. Please check if your device is supported by this software, is connected, in the right mode (oscilloscope mode) and if the driver is correctly installed. Refer to the <a href='https://github.com/OpenHantek/openhantek/'>website</a> for help: %1").arg(findDevices.getErrorMessage()));
62
-
return -1;
63
-
}
64
-
65
-
// Upload firmwares for all connected devices
66
-
for (auto i = devices.begin(); i != devices.end(); ++i) {
67
-
if (i->get()->needsFirmware()) {
68
-
UploadFirmware uf;
69
-
if (!uf.startUpload(i->get())) {
70
-
showMessage(QCoreApplication::translate("","Uploading firmware to %1: failed").arg(uf.getErrorMessage()));
71
-
} else {
72
-
showMessage(QCoreApplication::translate("","Uploading firmware to %1: done").arg(QString::fromStdString(i->get()->getModel().name)));
73
-
}
74
-
}
75
-
}
76
-
77
-
devices.clear();
78
-
79
-
// Find first ready device
80
-
devices = findDevices.findDevices();
81
-
std::unique_ptr<USBDevice> device;
82
-
for (auto i = devices.begin(); i != devices.end(); ++i) {
83
-
if (i->get()->needsFirmware()) continue;
84
-
QString errorMessage;
85
-
if (i->get()->connectDevice(errorMessage)) {
86
-
device = std::move(*i);
87
-
break;
88
-
} else {
89
-
showMessage(QCoreApplication::translate("","A device was found, but the connection could not be established: %1").arg(findDevices.getErrorMessage()));
90
-
}
91
-
}
92
-
93
-
if (device == nullptr) {
94
-
showMessage(QCoreApplication::translate("","A device was found, but the firmware upload seem to have failed or the connection could not be established: %1").arg(findDevices.getErrorMessage()));
showMessage(QCoreApplication::translate("","No Hantek oscilloscope found. Please check if your device is supported by this software, is connected, in the right mode (oscilloscope mode) and if the driver is correctly installed. Refer to the <a href='https://github.com/OpenHantek/openhantek/'>website</a> for help: %1").arg(findDevices.getErrorMessage()));
68
+
return -1;
69
+
}
70
+
71
+
//////// Upload firmwares for all connected devices ////////
showMessage(QCoreApplication::translate("","The connection to %1 can not be established: %2").arg(modelName).arg(findDevices.getErrorMessage()));
112
+
}
113
+
}
114
+
115
+
if (device == nullptr) {
116
+
showMessage(QCoreApplication::translate("","A device was found, but the firmware upload seem to have failed or the connection could not be established: %1").arg(findDevices.getErrorMessage()));
117
+
return -1;
118
+
}
119
+
120
+
//////// Create DSO control object and move it to a separate thread ////////
0 commit comments