Browse Source

Merge pull request #1744 from DonLakeFlyer/BootloaderFix

Handle older bootloaders for Firmware Upgrade
QGC4.4
Don Gagne 10 years ago
parent
commit
b1b8548581
  1. 1
      src/SerialPortIds.h
  2. 4
      src/VehicleSetup/PX4FirmwareUpgradeThread.cc

1
src/SerialPortIds.h

@ -31,6 +31,7 @@ public: @@ -31,6 +31,7 @@ public:
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 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

4
src/VehicleSetup/PX4FirmwareUpgradeThread.cc

@ -136,19 +136,17 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QSerialPortInfo& portIn @@ -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;

Loading…
Cancel
Save