diff --git a/src/SerialPortIds.h b/src/SerialPortIds.h index f4f167ee099e60faade1b22a07b42c89a51b0824..a9613781bd4ae8af730e2ceeb98589e7005cc2d2 100644 --- a/src/SerialPortIds.h +++ b/src/SerialPortIds.h @@ -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 diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index f4d5627d4010dc04a35c29ab4a5ca3915779ce24..46cac9be523ebd827cf9ca5256bde5d87e338442 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -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 { } } } // QGCViewPabel -} // QGCView \ No newline at end of file +} // QGCView diff --git a/src/VehicleSetup/FirmwareUpgradeController.cc b/src/VehicleSetup/FirmwareUpgradeController.cc index 4bece5b09737b8ef8ad9382c4a22d9f532f4fc40..66992cdc37e580b1b48ee53988e480a6f4592c62 100644 --- a/src/VehicleSetup/FirmwareUpgradeController.cc +++ b/src/VehicleSetup/FirmwareUpgradeController.cc @@ -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) 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]); diff --git a/src/VehicleSetup/PX4FirmwareUpgradeThread.cc b/src/VehicleSetup/PX4FirmwareUpgradeThread.cc index 484f3162f187bb866ee098b9ad3294b737bb7b34..31ecc42fbd365d39b5201b76c4873629201cd8e1 100644 --- a/src/VehicleSetup/PX4FirmwareUpgradeThread.cc +++ b/src/VehicleSetup/PX4FirmwareUpgradeThread.cc @@ -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: diff --git a/src/VehicleSetup/PX4FirmwareUpgradeThread.h b/src/VehicleSetup/PX4FirmwareUpgradeThread.h index 23b35d221234eedac33517fe8a9a53f4ed7d5e94..927832606cb1a93b5f839a7506ccd216081ed25b 100644 --- a/src/VehicleSetup/PX4FirmwareUpgradeThread.h +++ b/src/VehicleSetup/PX4FirmwareUpgradeThread.h @@ -45,7 +45,8 @@ typedef enum { FoundBoardPX4FMUV1, FoundBoardPX4FMUV2, FoundBoardPX4Flow, - FoundBoard3drRadio + FoundBoard3drRadio, + FoundBoardAeroCore } PX4FirmwareUpgradeFoundBoardType_t; class PX4FirmwareUpgradeThreadController;