From 99ff1b91df233c2e39564e582d7430e1da3e8309 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Tue, 24 Mar 2026 12:29:34 -0300 Subject: [PATCH 1/2] frontend: fix InlineParameterEditor not displaying zero values The truthiness check `if (this.param?.value)` treated 0 as falsy, so `internal_new_value_as_string` was never set and the field showed the placeholder label instead of "0". Use `this.param != null` to check for parameter existence regardless of its value. Made-with: Cursor --- .../src/components/parameter-editor/InlineParameterEditor.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue index 883ea1c096..2fea8b7b5d 100644 --- a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue +++ b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue @@ -322,7 +322,7 @@ export default Vue.extend({ .map((value) => parseFloat(value)) .includes(this.internal_new_value) } - if (this.param?.value) { + if (this.param != null) { this.internal_new_value_as_string = this.internal_new_value.toString() } From 1f1d18ac17c36569bc55131d3714eccaa139607f Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Tue, 24 Mar 2026 12:29:40 -0300 Subject: [PATCH 2/2] frontend: add Power configuration tab to vehicle setup Add a Power subtab under Vehicle Setup > Configure, modeled after QGC's APMPowerComponent. Supports Battery 1/2 monitor selection, power sensor presets (including Blue Robotics PSM), capacity, arming voltage, and advanced calibration with voltage multiplier and amps per volt calculation dialogs. Made-with: Cursor --- .../src/components/vehiclesetup/Configure.vue | 3 + .../configuration/power/BatteryCard.vue | 459 ++++++++++++++++++ .../power/PowerConfiguration.vue | 72 +++ 3 files changed, 534 insertions(+) create mode 100644 core/frontend/src/components/vehiclesetup/configuration/power/BatteryCard.vue create mode 100644 core/frontend/src/components/vehiclesetup/configuration/power/PowerConfiguration.vue diff --git a/core/frontend/src/components/vehiclesetup/Configure.vue b/core/frontend/src/components/vehiclesetup/Configure.vue index cce88ea16f..c75b76f982 100644 --- a/core/frontend/src/components/vehiclesetup/Configure.vue +++ b/core/frontend/src/components/vehiclesetup/Configure.vue @@ -46,6 +46,7 @@ import Camera from './configuration/camera.vue' import ArdupilotMavlinkCompassSetup from './configuration/compass/ArdupilotMavlinkCompassSetup.vue' import FailsafesConfiguration from './configuration/failsafes/Failsafes.vue' import LightsConfigration from './configuration/lights.vue' +import PowerConfiguration from './configuration/power/PowerConfiguration.vue' import BaroCalib from './overview/BaroCalib.vue' import GripperInfo from './overview/gripper.vue' import GyroCalib from './overview/GyroCalib.vue' @@ -72,6 +73,7 @@ export default Vue.extend({ LeakInfo, ParamSets, LightsConfigration, + PowerConfiguration, ArdupilotMavlinkCompassSetup, ArdupilotAccelerometerSetup, SpinningLogo, @@ -97,6 +99,7 @@ export default Vue.extend({ filter: () => autopilot.vehicle_type === 'Submarine', }, { title: 'Failsafes', value: 'failsafes', component: FailsafesConfiguration }, + { title: 'Power', value: 'power', component: PowerConfiguration }, { title: 'Camera Gimbal', value: 'camera', component: Camera }, ] as Item[], } diff --git a/core/frontend/src/components/vehiclesetup/configuration/power/BatteryCard.vue b/core/frontend/src/components/vehiclesetup/configuration/power/BatteryCard.vue new file mode 100644 index 0000000000..30a0cdf172 --- /dev/null +++ b/core/frontend/src/components/vehiclesetup/configuration/power/BatteryCard.vue @@ -0,0 +1,459 @@ + + + + + + + diff --git a/core/frontend/src/components/vehiclesetup/configuration/power/PowerConfiguration.vue b/core/frontend/src/components/vehiclesetup/configuration/power/PowerConfiguration.vue new file mode 100644 index 0000000000..d3b6d44201 --- /dev/null +++ b/core/frontend/src/components/vehiclesetup/configuration/power/PowerConfiguration.vue @@ -0,0 +1,72 @@ + + + + +