Commit b1b85485 authored by Don Gagne's avatar Don Gagne

Merge pull request #1744 from DonLakeFlyer/BootloaderFix

Handle older bootloaders for Firmware Upgrade
parents f0ec6b66 201a2a0b
......@@ -28,17 +28,18 @@
class SerialPortIds {
public:
static const int px4VendorId = 9900; ///< Vendor ID for Pixhawk board (V2 and V1) and PX4 Flow
static const int px4VendorId = 9900; ///< Vendor ID for Pixhawk board (V2 and V1) and PX4 Flow
static const int pixhawkFMUV2ProductId = 17; ///< Product ID for Pixhawk V2 board
static const int pixhawkFMUV1ProductId = 16; ///< Product ID for PX4 FMU V1 board
static const int pixhawkFMUV2ProductId = 17; ///< Product ID for Pixhawk V2 board
static const int pixhawkFMUV2OldBootloaderProductId = 22; ///< Product ID for Bootloader on older Pixhawk V2 boards
static const int pixhawkFMUV1ProductId = 16; ///< Product ID for PX4 FMU V1 board
static const int AeroCoreProductId = 4097; ///< Product ID for the AeroCore board
static const int AeroCoreProductId = 4097; ///< Product ID for the AeroCore board
static const int px4FlowProductId = 21; ///< Product ID for PX4 Flow board
static const int px4FlowProductId = 21; ///< Product ID for PX4 Flow board
static const int threeDRRadioVendorId = 1027; ///< Vendor ID for 3DR Radio
static const int threeDRRadioProductId = 24597; ///< Product ID for 3DR Radio
static const int threeDRRadioVendorId = 1027; ///< Vendor ID for 3DR Radio
static const int threeDRRadioProductId = 24597; ///< Product ID for 3DR Radio
};
#endif
......@@ -136,19 +136,17 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QSerialPortInfo& portIn
bool found = false;
foreach (QSerialPortInfo info, QSerialPortInfo::availablePorts()) {
#if 0
qCDebug(FirmwareUpgradeLog) << "Serial Port --------------";
qCDebug(FirmwareUpgradeLog) << "\tport name:" << info.portName();
qCDebug(FirmwareUpgradeLog) << "\tdescription:" << info.description();
qCDebug(FirmwareUpgradeLog) << "\tsystem location:" << info.systemLocation();
qCDebug(FirmwareUpgradeLog) << "\tvendor ID:" << info.vendorIdentifier();
qCDebug(FirmwareUpgradeLog) << "\tproduct ID:" << info.productIdentifier();
#endif
if (!info.portName().isEmpty()) {
switch (info.vendorIdentifier()) {
case SerialPortIds::px4VendorId:
if (info.productIdentifier() == SerialPortIds::pixhawkFMUV2ProductId) {
if (info.productIdentifier() == SerialPortIds::pixhawkFMUV2ProductId || info.productIdentifier() == SerialPortIds::pixhawkFMUV2OldBootloaderProductId) {
qCDebug(FirmwareUpgradeLog) << "Found PX4 FMU V2";
type = FoundBoardPX4FMUV2;
found = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment