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() } 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 @@ + + + + + mdi-battery + + {{ title }} + + + {{ voltage.toFixed(2) }} V / {{ (current ?? 0).toFixed(2) }} A + + + + + + + + + + + + + + + + + + Power Sensor + + + + + + + + + {{ show_advanced ? 'mdi-chevron-up' : 'mdi-chevron-down' }} + + {{ show_advanced ? 'Hide' : 'Show' }} Advanced + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Calculate + + + + + + If the reported voltage differs from a voltmeter reading, adjust the multiplier. + + + + + + + + + + + + Calculate + + + + + + + + + + + + + + + Adjust if the vehicle reports current draw when there is none flowing. + + + + + + + + + + + + + + + + + + + + + + + + + + Calculate Voltage Multiplier + + + + Measure battery voltage with an external voltmeter and enter it below. + + + + Vehicle Voltage: {{ voltage.toFixed(3) }} V + + + Current Multiplier: {{ voltMultParam.value }} + + + + + + Cancel + + + Calculate & Set + + + + + + + + + Calculate Amps per Volt + + + + Measure current draw with an external current meter and enter it below. + + + + Vehicle Current: {{ current.toFixed(3) }} A + + + Current Amps/Volt: {{ ampPerVoltParam.value }} + + + + + + Cancel + + + Calculate & Set + + + + + + + + + + + + + + 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 @@ + + + + + + + + + +
+ Measure battery voltage with an external voltmeter and enter it below. +
+ Measure current draw with an external current meter and enter it below. +