Browse Source

Add Gumstix AeroCore board support to firmware flashing.

QGC4.4
Andrew C. Smith 10 years ago
parent
commit
857d339103
  1. 2
      src/SerialPortIds.h
  2. 4
      src/VehicleSetup/FirmwareUpgrade.qml
  3. 19
      src/VehicleSetup/FirmwareUpgradeController.cc
  4. 4
      src/VehicleSetup/PX4FirmwareUpgradeThread.cc
  5. 3
      src/VehicleSetup/PX4FirmwareUpgradeThread.h

2
src/SerialPortIds.h

@ -32,6 +32,8 @@ public: @@ -32,6 +32,8 @@ public:
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 AeroCoreProductId = 4097; ///< Product ID for the AeroCore board
static const int px4FlowProductId = 21; ///< Product ID for PX4 Flow board

4
src/VehicleSetup/FirmwareUpgrade.qml

@ -96,7 +96,7 @@ QGCView { @@ -96,7 +96,7 @@ QGCView {
} else {
// We end up here when we detect a board plugged in after we've started upgrade
statusTextArea.append(highlightPrefix + "Found device" + highlightSuffix + ": " + controller.boardType)
if (controller.boardType == "Pixhawk") {
if (controller.boardType == "Pixhawk" || controller.boardType == "AeroCore") {
showDialog(pixhawkFirmwareSelectDialog, title, 50, StandardButton.Ok | StandardButton.Cancel)
}
}
@ -367,4 +367,4 @@ QGCView { @@ -367,4 +367,4 @@ QGCView {
}
}
} // QGCViewPabel
} // QGCView
} // QGCView

19
src/VehicleSetup/FirmwareUpgradeController.cc

@ -94,6 +94,10 @@ void FirmwareUpgradeController::_foundBoard(bool firstAttempt, const QSerialPort @@ -94,6 +94,10 @@ void FirmwareUpgradeController::_foundBoard(bool firstAttempt, const QSerialPort
_foundBoardType = "Pixhawk";
_startFlashWhenBootloaderFound = false;
break;
case FoundBoardAeroCore:
_foundBoardType = "AeroCore";
_startFlashWhenBootloaderFound = false;
break;
case FoundBoardPX4Flow:
case FoundBoard3drRadio:
_foundBoardType = type == FoundBoardPX4Flow ? "PX4 Flow" : "3DR Radio";
@ -167,9 +171,18 @@ void FirmwareUpgradeController::_getFirmwareFile(FirmwareType_t firmwareType) @@ -167,9 +171,18 @@ void FirmwareUpgradeController::_getFirmwareFile(FirmwareType_t firmwareType)
static const size_t crgPX4FMUV2Firmware = sizeof(rgPX4FMUV2Firmware) / sizeof(rgPX4FMUV2Firmware[0]);
static const DownloadLocationByFirmwareType_t rgAeroCoreFirmware[] = {
{ PX4StableFirmware, "http://s3-us-west-2.amazonaws.com/gumstix-aerocore/PX4/stable/aerocore_default.px4" },
{ PX4BetaFirmware, "http://s3-us-west-2.amazonaws.com/gumstix-aerocore/PX4/beta/aerocore_default.px4" },
{ PX4DeveloperFirmware, "http://s3-us-west-2.amazonaws.com/gumstix-aerocore/PX4/master/aerocore_default.px4" },
{ PX4StableFirmware, "http://gumstix-aerocore.s3.amazonaws.com/PX4/stable/aerocore_default.px4" },
{ PX4BetaFirmware, "http://gumstix-aerocore.s3.amazonaws.com/PX4/beta/aerocore_default.px4" },
{ PX4DeveloperFirmware, "http://gumstix-aerocore.s3.amazonaws.com/PX4/master/aerocore_default.px4" },
{ ApmArduCopterQuadFirmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Copter/stable/PX4-quad/ArduCopter-aerocore.px4" },
{ ApmArduCopterX8Firmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Copter/stable/PX4-octa-quad/ArduCopter-aerocore.px4" },
{ ApmArduCopterHexaFirmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Copter/stable/PX4-hexa/ArduCopter-aerocore.px4" },
{ ApmArduCopterOctoFirmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Copter/stable/PX4-octa/ArduCopter-aerocore.px4" },
{ ApmArduCopterYFirmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Copter/stable/PX4-tri/ArduCopter-aerocore.px4" },
{ ApmArduCopterY6Firmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Copter/stable/PX4-y6/ArduCopter-aerocore.px4" },
{ ApmArduCopterHeliFirmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Copter/stable/PX4-heli/ArduCopter-aerocore.px4" },
{ ApmArduPlaneFirmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Plane/stable/PX4/ArduPlane-aerocore.px4" },
{ ApmRoverFirmware, "http://gumstix-aerocore.s3.amazonaws.com/APM/Plane/stable/PX4/APMrover2-aerocore.px4" },
};
static const size_t crgAeroCoreFirmware = sizeof(rgAeroCoreFirmware) / sizeof(rgAeroCoreFirmware[0]);

4
src/VehicleSetup/PX4FirmwareUpgradeThread.cc

@ -160,6 +160,10 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QSerialPortInfo& portIn @@ -160,6 +160,10 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QSerialPortInfo& portIn
qCDebug(FirmwareUpgradeLog) << "Found PX4 Flow";
type = FoundBoardPX4Flow;
found = true;
} else if (info.productIdentifier() == SerialPortIds::AeroCoreProductId) {
qCDebug(FirmwareUpgradeLog) << "Found AeroCore";
type = FoundBoardAeroCore;
found = true;
}
break;
case SerialPortIds::threeDRRadioVendorId:

3
src/VehicleSetup/PX4FirmwareUpgradeThread.h

@ -45,7 +45,8 @@ typedef enum { @@ -45,7 +45,8 @@ typedef enum {
FoundBoardPX4FMUV1,
FoundBoardPX4FMUV2,
FoundBoardPX4Flow,
FoundBoard3drRadio
FoundBoard3drRadio,
FoundBoardAeroCore
} PX4FirmwareUpgradeFoundBoardType_t;
class PX4FirmwareUpgradeThreadController;

Loading…
Cancel
Save