Commit 00e02c01 authored by Pritam Ghanghas's avatar Pritam Ghanghas

fix the broken 3DR radio flashing. My carelessness when I introduced APM firmware update

Also enable identification of clone 3dr radios
parent fb48b351
...@@ -39,7 +39,9 @@ public: ...@@ -39,7 +39,9 @@ public:
static const int px4FlowProductId = 21; ///< Product ID for PX4 Flow board static const int px4FlowProductId = 21; ///< Product ID for PX4 Flow board
static const int threeDRRadioVendorId = 1027; ///< Vendor ID for 3DR Radio static const int threeDRRadioVendorId = 1027; ///< Vendor ID for 3DR Radio
static const int cloneThreeDRRadioVendorId = 4292; ///< Vendor ID found on clone 3DR Radio
static const int threeDRRadioProductId = 24597; ///< Product ID for 3DR Radio static const int threeDRRadioProductId = 24597; ///< Product ID for 3DR Radio
static const int cloneThreeDRRadioProductId = 60000; ///< Product ID found on clone 3DR Radio
}; };
#endif #endif
...@@ -131,7 +131,7 @@ void FirmwareUpgradeController::_foundBoard(bool firstAttempt, const QSerialPort ...@@ -131,7 +131,7 @@ void FirmwareUpgradeController::_foundBoard(bool firstAttempt, const QSerialPort
// Radio always flashes latest firmware, so we can start right away without // Radio always flashes latest firmware, so we can start right away without
// any further user input. // any further user input.
_startFlashWhenBootloaderFound = true; _startFlashWhenBootloaderFound = true;
_startFlashWhenBootloaderFoundFirmwareIdentity = FirmwareIdentifier(PX4Radio, _startFlashWhenBootloaderFoundFirmwareIdentity = FirmwareIdentifier(ThreeDRRadio,
StableFirmware, StableFirmware,
DefaultVehicleFirmware); DefaultVehicleFirmware);
} }
...@@ -265,7 +265,7 @@ void FirmwareUpgradeController::_initFirmwareHash() ...@@ -265,7 +265,7 @@ void FirmwareUpgradeController::_initFirmwareHash()
/////////////////////////////// 3dr radio firmwares /////////////////////////////////////// /////////////////////////////// 3dr radio firmwares ///////////////////////////////////////
FirmwareToUrlElement_t rg3DRRadioFirmwareArray[] = { FirmwareToUrlElement_t rg3DRRadioFirmwareArray[] = {
{ PX4Flow, StableFirmware, DefaultVehicleFirmware, "http://firmware.diydrones.com/SiK/latest/radio~hm_trp.ihx"} { ThreeDRRadio, StableFirmware, DefaultVehicleFirmware, "http://firmware.diydrones.com/SiK/beta/radio~hm_trp.ihx"}
}; };
// populate hashes now // populate hashes now
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
AutoPilotStackPX4, AutoPilotStackPX4,
AutoPilotStackAPM, AutoPilotStackAPM,
PX4Flow, PX4Flow,
PX4Radio ThreeDRRadio
} AutoPilotStackType_t; } AutoPilotStackType_t;
typedef enum { typedef enum {
......
...@@ -165,7 +165,9 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QSerialPortInfo& portIn ...@@ -165,7 +165,9 @@ bool PX4FirmwareUpgradeThreadWorker::_findBoardFromPorts(QSerialPortInfo& portIn
} }
break; break;
case SerialPortIds::threeDRRadioVendorId: case SerialPortIds::threeDRRadioVendorId:
if (info.productIdentifier() == SerialPortIds::threeDRRadioProductId) { case SerialPortIds::cloneThreeDRRadioVendorId:
if (info.productIdentifier() == SerialPortIds::threeDRRadioProductId ||
info.productIdentifier() == SerialPortIds::cloneThreeDRRadioProductId) {
qCDebug(FirmwareUpgradeLog) << "Found 3DR Radio"; qCDebug(FirmwareUpgradeLog) << "Found 3DR Radio";
type = FoundBoard3drRadio; type = FoundBoard3drRadio;
found = true; found = true;
......
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