1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-27 16:54:15 +01:00

LP-574 Rename function and var names

This commit is contained in:
Laurent Lalanne 2018-02-14 13:19:09 +01:00
parent 773bc084e5
commit 6c9ecf703b
2 changed files with 10 additions and 10 deletions
ground/gcs/src/share/qml

@ -318,12 +318,12 @@ function batteryModuleEnabled() {
return (hwSettings.optionalModulesBattery == HwSettings.OptionalModules.Enabled); return (hwSettings.optionalModulesBattery == HwSettings.OptionalModules.Enabled);
} }
function batteryModuleADCConfigured() { function batteryADCConfigured() {
for (var adc = 0; adc < 8; adc++) { for (var i = 0; i < 8; i++) {
var adc_set = hwSettings.getADCRouting(adc); var adcRouting = hwSettings.getADCRouting(i);
if (adc_set == HwSettings.ADCRouting.BatteryVoltage) { if (adcRouting == HwSettings.ADCRouting.BatteryVoltage) {
return true; return true;
} else if (adc_set == HwSettings.ADCRouting.BatteryCurrent) { } else if (adcRouting == HwSettings.ADCRouting.BatteryCurrent) {
return true; return true;
} }
} }

@ -281,7 +281,7 @@ Item {
width: scaledBounds.width * sceneItem.width width: scaledBounds.width * sceneItem.width
height: scaledBounds.height * sceneItem.height height: scaledBounds.height * sceneItem.height
y: scaledBounds.y * sceneItem.height y: scaledBounds.y * sceneItem.height
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
@ -296,7 +296,7 @@ Item {
width: scaledBounds.width * sceneItem.width width: scaledBounds.width * sceneItem.width
height: scaledBounds.height * sceneItem.height height: scaledBounds.height * sceneItem.height
y: Math.floor(scaledBounds.y * sceneItem.height) y: Math.floor(scaledBounds.y * sceneItem.height)
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
} }
SvgElementPositionItem { SvgElementPositionItem {
@ -307,7 +307,7 @@ Item {
width: scaledBounds.width * sceneItem.width width: scaledBounds.width * sceneItem.width
height: scaledBounds.height * sceneItem.height height: scaledBounds.height * sceneItem.height
y: scaledBounds.y * sceneItem.height y: scaledBounds.y * sceneItem.height
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
@ -334,7 +334,7 @@ Item {
width: scaledBounds.width * sceneItem.width width: scaledBounds.width * sceneItem.width
height: scaledBounds.height * sceneItem.height height: scaledBounds.height * sceneItem.height
y: scaledBounds.y * sceneItem.height y: scaledBounds.y * sceneItem.height
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
@ -361,7 +361,7 @@ Item {
width: scaledBounds.width * sceneItem.width width: scaledBounds.width * sceneItem.width
height: scaledBounds.height * sceneItem.height height: scaledBounds.height * sceneItem.height
y: scaledBounds.y * sceneItem.height y: scaledBounds.y * sceneItem.height
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured()) visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent