diff --git a/ground/gcs/src/share/qml/js/uav.js b/ground/gcs/src/share/qml/js/uav.js index ec810c9de..95660ae8a 100644 --- a/ground/gcs/src/share/qml/js/uav.js +++ b/ground/gcs/src/share/qml/js/uav.js @@ -318,12 +318,12 @@ function batteryModuleEnabled() { return (hwSettings.optionalModulesBattery == HwSettings.OptionalModules.Enabled); } -function batteryModuleADCConfigured() { - for (var adc = 0; adc < 8; adc++) { - var adc_set = hwSettings.getADCRouting(adc); - if (adc_set == HwSettings.ADCRouting.BatteryVoltage) { +function batteryADCConfigured() { + for (var i = 0; i < 8; i++) { + var adcRouting = hwSettings.getADCRouting(i); + if (adcRouting == HwSettings.ADCRouting.BatteryVoltage) { return true; - } else if (adc_set == HwSettings.ADCRouting.BatteryCurrent) { + } else if (adcRouting == HwSettings.ADCRouting.BatteryCurrent) { return true; } } diff --git a/ground/gcs/src/share/qml/pfd/Info.qml b/ground/gcs/src/share/qml/pfd/Info.qml index 94fb2bafe..ed76cb3a9 100644 --- a/ground/gcs/src/share/qml/pfd/Info.qml +++ b/ground/gcs/src/share/qml/pfd/Info.qml @@ -281,7 +281,7 @@ Item { width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) + visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured()) Rectangle { anchors.fill: parent @@ -296,7 +296,7 @@ Item { width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height y: Math.floor(scaledBounds.y * sceneItem.height) - visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) + visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured()) } SvgElementPositionItem { @@ -307,7 +307,7 @@ Item { width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) + visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured()) Rectangle { anchors.fill: parent @@ -334,7 +334,7 @@ Item { width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) + visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured()) Rectangle { anchors.fill: parent @@ -361,7 +361,7 @@ Item { width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) + visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured()) Rectangle { anchors.fill: parent