Browse Source

Firmware Upgrade Fixes

Custom, single firmware upgrades were fixed to "stable", even if the user selected "custom".
The code, when selecting the firmware type was using the combo box model index instead of the actual type defined by the list model.
QGC4.4
Gus Grubba 7 years ago
parent
commit
0520baf5bd
  1. 4
      src/VehicleSetup/FirmwareUpgrade.qml
  2. 4
      src/VehicleSetup/FirmwareUpgradeController.cc
  3. 2
      src/VehicleSetup/FirmwareUpgradeController.h

4
src/VehicleSetup/FirmwareUpgrade.qml

@ -168,7 +168,7 @@ SetupPage { @@ -168,7 +168,7 @@ SetupPage {
function accept() {
hideDialog()
if (_singleFirmwareMode) {
controller.flashSingleFirmwareMode()
controller.flashSingleFirmwareMode(controller.selectedFirmwareType)
} else {
var stack = apmFlightStack.checked ? FirmwareUpgradeController.AutoPilotStackAPM : FirmwareUpgradeController.AutoPilotStackPX4
if (px4Flow) {
@ -353,7 +353,7 @@ SetupPage { @@ -353,7 +353,7 @@ SetupPage {
currentIndex: controller.selectedFirmwareType
onActivated: {
controller.selectedFirmwareType = index
controller.selectedFirmwareType = model.get(index).firmwareType
if (model.get(index).firmwareType === FirmwareUpgradeController.BetaFirmware) {
firmwareVersionWarningLabel.visible = true
firmwareVersionWarningLabel.text = qsTr("WARNING: BETA FIRMWARE. ") +

4
src/VehicleSetup/FirmwareUpgradeController.cc

@ -114,9 +114,9 @@ void FirmwareUpgradeController::flash(const FirmwareIdentifier& firmwareId) @@ -114,9 +114,9 @@ void FirmwareUpgradeController::flash(const FirmwareIdentifier& firmwareId)
flash(firmwareId.autopilotStackType, firmwareId.firmwareType, firmwareId.firmwareVehicleType);
}
void FirmwareUpgradeController::flashSingleFirmwareMode(void)
void FirmwareUpgradeController::flashSingleFirmwareMode(FirmwareType_t firmwareType)
{
flash(SingleFirmwareMode, StableFirmware, DefaultVehicleFirmware);
flash(SingleFirmwareMode, firmwareType, DefaultVehicleFirmware);
}
void FirmwareUpgradeController::cancel(void)

2
src/VehicleSetup/FirmwareUpgradeController.h

@ -123,7 +123,7 @@ public: @@ -123,7 +123,7 @@ public:
FirmwareVehicleType_t vehicleType = DefaultVehicleFirmware );
/// Called to flash when upgrade is running in singleFirmwareMode
Q_INVOKABLE void flashSingleFirmwareMode(void);
Q_INVOKABLE void flashSingleFirmwareMode(FirmwareType_t firmwareType);
Q_INVOKABLE FirmwareVehicleType_t vehicleTypeFromVersionIndex(int index);

Loading…
Cancel
Save