1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +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

View File

@ -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;
}
}

View File

@ -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