Commit ff07d06f authored by Travis Bottalico's avatar Travis Bottalico

Add support for ModalAI FC v1 FW Update

parent 916f9938
......@@ -78,6 +78,7 @@ public:
static const int boardIDFMUK66V3 = 28; ///< FMUK66V3 board, as from USB PID
static const int boardIDKakuteF7 = 123; ///< Holybro KakuteF7 board, as from USB PID
static const int boardIDDurandalV1 = 139; ///< Holybro Durandal-v1 board, as from USB PID
static const int boardIDModalFCV1 = 41775; ///< ModalAI FC V1 board, as from USB PID
/// Simulated board id for V3 which is a V2 board which supports larger flash space
/// IMPORTANT: Make sure this id does not conflict with any newly added real board ids
......
......@@ -325,6 +325,14 @@ void FirmwareUpgradeController::_initFirmwareHash()
{ AutoPilotStackPX4, BetaFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/beta/holybro_durandal-v1_default.px4"},
{ AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/holybro_durandal-v1_default.px4"},
};
//////////////////////////////////// ModalAI FC v1 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t rgModalFCV1FirmwareArray[] = {
{ AutoPilotStackPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/stable/modalai_fc-v1_default.px4"},
{ AutoPilotStackPX4, BetaFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/beta/modalai_fc-v1_default.px4"},
{ AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/modalai_fc-v1_default.px4"},
};
/////////////////////////////// px4flow firmwares ///////////////////////////////////////
FirmwareToUrlElement_t rgPX4FLowFirmwareArray[] = {
{ PX4FlowPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4" },
......@@ -424,6 +432,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
_rgFMUK66V3Firmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
}
size = sizeof(rgModalFCV1FirmwareArray)/sizeof(rgModalFCV1FirmwareArray[0]);
for (int i = 0; i < size; i++) {
const FirmwareToUrlElement_t& element = rgModalFCV1FirmwareArray[i];
_rgModalFCV1Firmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
}
size = sizeof(rgPX4FLowFirmwareArray)/sizeof(rgPX4FLowFirmwareArray[0]);
for (int i = 0; i < size; i++) {
const FirmwareToUrlElement_t& element = rgPX4FLowFirmwareArray[i];
......@@ -504,6 +518,9 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
case Bootloader::boardIDFMUK66V3:
_rgFirmwareDynamic = _rgFMUK66V3Firmware;
break;
case Bootloader::boardIDModalFCV1:
_rgFirmwareDynamic = _rgModalFCV1Firmware;
break;
case Bootloader::boardID3DRRadio:
_rgFirmwareDynamic = _rg3DRRadioFirmware;
break;
......
......@@ -220,6 +220,7 @@ private:
QHash<FirmwareIdentifier, QString> _rgKakuteF7Firmware;
QHash<FirmwareIdentifier, QString> _rgDurandalV1Firmware;
QHash<FirmwareIdentifier, QString> _rgFMUK66V3Firmware;
QHash<FirmwareIdentifier, QString> _rgModalFCV1Firmware;
QHash<FirmwareIdentifier, QString> _rgPX4FLowFirmware;
QHash<FirmwareIdentifier, QString> _rg3DRRadioFirmware;
......
......@@ -20,6 +20,7 @@
{ "vendorID": 9900, "productID": 22, "boardClass": "Pixhawk", "name": "Crazyflie 2" },
{ "vendorID": 9900, "productID": 1, "boardClass": "Pixhawk", "name": "Omnibus F4 SD" },
{ "vendorID": 8137, "productID": 28, "boardClass": "Pixhawk", "name": "PX4 FMUK66 v3.x" },
{ "vendorID": 1155, "productID": 41775, "boardClass": "Pixhawk", "name": "PX4 FMU ModalAI FCv1" },
{ "vendorID": 1155, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" },
{ "vendorID": 4617, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" },
......
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