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. 3
      src/AutoPilotPlugins/APM/APMSensorsComponent.qml

3
src/AutoPilotPlugins/APM/APMSensorsComponent.qml

@ -364,17 +364,16 @@ SetupPage { @@ -364,17 +364,16 @@ SetupPage {
property int _compassIndex: index
function selectPriorityfromParams() {
if (visible) {
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
}
}
}
}
Component.onCompleted: selectPriorityfromParams()

Loading…
Cancel
Save