Skip to content

Commit 6c9ecf7

Browse files
committed
LP-574 Rename function and var names
1 parent 773bc08 commit 6c9ecf7

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

ground/gcs/src/share/qml/js/uav.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,12 @@ function batteryModuleEnabled() {
318318
return (hwSettings.optionalModulesBattery == HwSettings.OptionalModules.Enabled);
319319
}
320320

321-
function batteryModuleADCConfigured() {
322-
for (var adc = 0; adc < 8; adc++) {
323-
var adc_set = hwSettings.getADCRouting(adc);
324-
if (adc_set == HwSettings.ADCRouting.BatteryVoltage) {
321+
function batteryADCConfigured() {
322+
for (var i = 0; i < 8; i++) {
323+
var adcRouting = hwSettings.getADCRouting(i);
324+
if (adcRouting == HwSettings.ADCRouting.BatteryVoltage) {
325325
return true;
326-
} else if (adc_set == HwSettings.ADCRouting.BatteryCurrent) {
326+
} else if (adcRouting == HwSettings.ADCRouting.BatteryCurrent) {
327327
return true;
328328
}
329329
}

ground/gcs/src/share/qml/pfd/Info.qml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Item {
281281
width: scaledBounds.width * sceneItem.width
282282
height: scaledBounds.height * sceneItem.height
283283
y: scaledBounds.y * sceneItem.height
284-
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured())
284+
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
285285

286286
Rectangle {
287287
anchors.fill: parent
@@ -296,7 +296,7 @@ Item {
296296
width: scaledBounds.width * sceneItem.width
297297
height: scaledBounds.height * sceneItem.height
298298
y: Math.floor(scaledBounds.y * sceneItem.height)
299-
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured())
299+
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
300300
}
301301

302302
SvgElementPositionItem {
@@ -307,7 +307,7 @@ Item {
307307
width: scaledBounds.width * sceneItem.width
308308
height: scaledBounds.height * sceneItem.height
309309
y: scaledBounds.y * sceneItem.height
310-
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured())
310+
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
311311

312312
Rectangle {
313313
anchors.fill: parent
@@ -334,7 +334,7 @@ Item {
334334
width: scaledBounds.width * sceneItem.width
335335
height: scaledBounds.height * sceneItem.height
336336
y: scaledBounds.y * sceneItem.height
337-
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured())
337+
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
338338

339339
Rectangle {
340340
anchors.fill: parent
@@ -361,7 +361,7 @@ Item {
361361
width: scaledBounds.width * sceneItem.width
362362
height: scaledBounds.height * sceneItem.height
363363
y: scaledBounds.y * sceneItem.height
364-
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryModuleADCConfigured())
364+
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled() && UAV.batteryADCConfigured())
365365

366366
Rectangle {
367367
anchors.fill: parent

0 commit comments

Comments
 (0)