Unverified Commit 455ac1ed authored by czhj's avatar czhj Committed by GitHub

Add Nora support (#9076)

Co-authored-by: 's avatarhuangjian <huangjian@cuav.net>
parent bd497a67
...@@ -56,6 +56,8 @@ public: ...@@ -56,6 +56,8 @@ public:
static const int boardIDModalFCV1 = 41775; ///< ModalAI FC V1 board, as from USB PID static const int boardIDModalFCV1 = 41775; ///< ModalAI FC V1 board, as from USB PID
static const int boardIDUVifyCore = 20; ///< UVify Core board, as from USB PID static const int boardIDUVifyCore = 20; ///< UVify Core board, as from USB PID
static const int boardIDCUAVX7 = 1010; ///< CUAV X7(Pro) board, as from USB PID static const int boardIDCUAVX7 = 1010; ///< CUAV X7(Pro) board, as from USB PID
static const int boardIDCUAVNora = 1009; ///< CUAV Nora board, as from USB PID
/// Simulated board id for V3 which is a V2 board which supports larger flash space /// 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 /// IMPORTANT: Make sure this id does not conflict with any newly added real board ids
......
...@@ -365,6 +365,13 @@ void FirmwareUpgradeController::_initFirmwareHash() ...@@ -365,6 +365,13 @@ void FirmwareUpgradeController::_initFirmwareHash()
{ ThreeDRRadio, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/SiK/stable/radio~hm_trp.ihx"} { ThreeDRRadio, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/SiK/stable/radio~hm_trp.ihx"}
}; };
/////////////////////////////// cuav nora firmwares ///////////////////////////////////////
FirmwareToUrlElement_t rgCUAVNoraFirmwareArray[] = {
{ AutoPilotStackPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/stable/cuav_nora_default.px4"},
{ AutoPilotStackPX4, BetaFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/beta/cuav_nora_default.px4"},
{ AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/cuav_nora_default.px4"},
};
// We build the maps for PX4 firmwares dynamically using the data below // We build the maps for PX4 firmwares dynamically using the data below
#if 0 #if 0
...@@ -403,6 +410,12 @@ void FirmwareUpgradeController::_initFirmwareHash() ...@@ -403,6 +410,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
_rgAeroCoreFirmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url); _rgAeroCoreFirmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
} }
size = sizeof(rgCUAVNoraFirmwareArray)/sizeof(rgCUAVNoraFirmwareArray[0]);
for (int i = 0; i < size; i++) {
const FirmwareToUrlElement_t& element = rgCUAVNoraFirmwareArray[i];
_rgCUAVNoraFireware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
}
size = sizeof(rgAUAVX2_1FirmwareArray)/sizeof(rgAUAVX2_1FirmwareArray[0]); size = sizeof(rgAUAVX2_1FirmwareArray)/sizeof(rgAUAVX2_1FirmwareArray[0]);
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
const FirmwareToUrlElement_t& element = rgAUAVX2_1FirmwareArray[i]; const FirmwareToUrlElement_t& element = rgAUAVX2_1FirmwareArray[i];
...@@ -570,6 +583,9 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo ...@@ -570,6 +583,9 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
case Bootloader::boardIDCUAVX7: case Bootloader::boardIDCUAVX7:
_rgFirmwareDynamic = _rgPX4CUAVX7Fireware; _rgFirmwareDynamic = _rgPX4CUAVX7Fireware;
break; break;
case Bootloader::boardIDCUAVNora:
_rgFirmwareDynamic = _rgCUAVNoraFireware;
break;
default: default:
// Unknown board id // Unknown board id
break; break;
......
...@@ -224,6 +224,8 @@ private: ...@@ -224,6 +224,8 @@ private:
QHash<FirmwareIdentifier, QString> _rgPX4FLowFirmware; QHash<FirmwareIdentifier, QString> _rgPX4FLowFirmware;
QHash<FirmwareIdentifier, QString> _rg3DRRadioFirmware; QHash<FirmwareIdentifier, QString> _rg3DRRadioFirmware;
QHash<FirmwareIdentifier, QString> _rgPX4CUAVX7Fireware; QHash<FirmwareIdentifier, QString> _rgPX4CUAVX7Fireware;
QHash<FirmwareIdentifier, QString> _rgCUAVNoraFireware;
// Hash map for ArduPilot ChibiOS lookup by board name // Hash map for ArduPilot ChibiOS lookup by board name
QHash<FirmwareIdentifier, QString> _rgAPMChibiosReplaceNamedBoardFirmware; QHash<FirmwareIdentifier, QString> _rgAPMChibiosReplaceNamedBoardFirmware;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{ "vendorID": 1155, "productID": 41775, "boardClass": "Pixhawk", "name": "PX4 FMU ModalAI FCv1" }, { "vendorID": 1155, "productID": 41775, "boardClass": "Pixhawk", "name": "PX4 FMU ModalAI FCv1" },
{ "vendorID":12642, "productID": 75, "boardClass": "Pixhawk", "name": "PX4 DurandalV1" }, { "vendorID":12642, "productID": 75, "boardClass": "Pixhawk", "name": "PX4 DurandalV1" },
{ "vendorID": 4104, "productID": 1, "boardClass": "Pixhawk", "name": "PX4 FMU UVify Core" }, { "vendorID": 4104, "productID": 1, "boardClass": "Pixhawk", "name": "PX4 FMU UVify Core" },
{ "vendorID": 12643, "productID": 76, "boardClass": "Pixhawk", "name": "PX4 CUAV X7(PRO)" }, { "vendorID": 12643, "productID": 76, "boardClass": "Pixhawk", "name": "CUAV Flight Controller" },
{ "vendorID": 1155, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" }, { "vendorID": 1155, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" },
{ "vendorID": 4617, "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