Browse Source

ApmSensorComponent.qml: setup priority comboboxes even if they are not visible

This step was not running at all
QGC4.4
Willian Galvani 3 years ago committed by Patrick José Pereira
parent
commit
a2f0d7a14c
  1. 15
      src/AutoPilotPlugins/APM/APMSensorsComponent.qml

15
src/AutoPilotPlugins/APM/APMSensorsComponent.qml

@ -364,14 +364,13 @@ SetupPage { @@ -364,14 +364,13 @@ SetupPage {
property int _compassIndex: index
function selectPriorityfromParams() {
if (visible) {
currentIndex = 3
var compassId = sensorParams.rgCompassId[_compassIndex].rawValue
for (var prioIndex=0; prioIndex<3; prioIndex++) {
if (compassId == sensorParams.rgCompassPrio[prioIndex].rawValue) {
currentIndex = prioIndex
break
}
currentIndex = 3
var compassId = sensorParams.rgCompassId[_compassIndex].rawValue
for (var prioIndex=0; prioIndex<3; prioIndex++) {
console.log(`comparing ${compassId} with ${sensorParams.rgCompassPrio[prioIndex].rawValue} (index ${prioIndex})`)
if (compassId == sensorParams.rgCompassPrio[prioIndex].rawValue) {
currentIndex = prioIndex
break
}
}
}

Loading…
Cancel
Save