diff --git a/core/frontend/public/assets/vehicles/models/boat/UNDEFINED.glb b/core/frontend/public/assets/vehicles/models/rover/BOAT.glb similarity index 100% rename from core/frontend/public/assets/vehicles/models/boat/UNDEFINED.glb rename to core/frontend/public/assets/vehicles/models/rover/BOAT.glb diff --git a/core/frontend/public/assets/vehicles/models/boat/UNDEFINED.json b/core/frontend/public/assets/vehicles/models/rover/BOAT.json similarity index 100% rename from core/frontend/public/assets/vehicles/models/boat/UNDEFINED.json rename to core/frontend/public/assets/vehicles/models/rover/BOAT.json diff --git a/core/frontend/public/assets/vehicles/models/rover/unknown.glb b/core/frontend/public/assets/vehicles/models/rover/unknown.glb index d2638af107..4aa4296f05 100644 Binary files a/core/frontend/public/assets/vehicles/models/rover/unknown.glb and b/core/frontend/public/assets/vehicles/models/rover/unknown.glb differ diff --git a/core/frontend/public/assets/vehicles/models/sub/BLUEROV1.glb b/core/frontend/public/assets/vehicles/models/sub/BLUEROV1.glb index 18da3d348c..084c25791c 100644 Binary files a/core/frontend/public/assets/vehicles/models/sub/BLUEROV1.glb and b/core/frontend/public/assets/vehicles/models/sub/BLUEROV1.glb differ diff --git a/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_3.glb b/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_3.glb index b17866ac2b..db74d3a171 100755 Binary files a/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_3.glb and b/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_3.glb differ diff --git a/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_4.glb b/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_4.glb index 95cc65eeff..bc2da19054 100755 Binary files a/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_4.glb and b/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_4.glb differ diff --git a/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_5.glb b/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_5.glb index c6827475b9..e023f953cb 100755 Binary files a/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_5.glb and b/core/frontend/public/assets/vehicles/models/sub/SIMPLEROV_5.glb differ diff --git a/core/frontend/public/assets/vehicles/models/sub/VECTORED.glb b/core/frontend/public/assets/vehicles/models/sub/VECTORED.glb index 05f86a6378..e2c0bc1d75 100644 Binary files a/core/frontend/public/assets/vehicles/models/sub/VECTORED.glb and b/core/frontend/public/assets/vehicles/models/sub/VECTORED.glb differ diff --git a/core/frontend/public/assets/vehicles/models/sub/VECTORED_6DOF.glb b/core/frontend/public/assets/vehicles/models/sub/VECTORED_6DOF.glb index 30d51cb6cc..1491ceef61 100644 Binary files a/core/frontend/public/assets/vehicles/models/sub/VECTORED_6DOF.glb and b/core/frontend/public/assets/vehicles/models/sub/VECTORED_6DOF.glb differ diff --git a/core/frontend/public/assets/vehicles/models/sub/bluerov.glb b/core/frontend/public/assets/vehicles/models/sub/bluerov.glb index d64a154c8c..79fb8aa08c 100755 Binary files a/core/frontend/public/assets/vehicles/models/sub/bluerov.glb and b/core/frontend/public/assets/vehicles/models/sub/bluerov.glb differ diff --git a/core/frontend/src/assets/3d/generic_sensor.glb b/core/frontend/src/assets/3d/generic_sensor.glb new file mode 100644 index 0000000000..9f5432b8a5 Binary files /dev/null and b/core/frontend/src/assets/3d/generic_sensor.glb differ diff --git a/core/frontend/src/assets/3d/navigator.glb b/core/frontend/src/assets/3d/navigator.glb new file mode 100644 index 0000000000..83eb0a0cb1 Binary files /dev/null and b/core/frontend/src/assets/3d/navigator.glb differ diff --git a/core/frontend/src/components/app/SettingsMenu.vue b/core/frontend/src/components/app/SettingsMenu.vue index e9a96414e4..2322a4a212 100644 --- a/core/frontend/src/components/app/SettingsMenu.vue +++ b/core/frontend/src/components/app/SettingsMenu.vue @@ -43,7 +43,7 @@ mdi-cog-refresh @@ -135,6 +135,12 @@ + { this.prepare_operation('Resetting settings...') diff --git a/core/frontend/src/components/common/WarningDialog.vue b/core/frontend/src/components/common/WarningDialog.vue new file mode 100644 index 0000000000..6f35412a78 --- /dev/null +++ b/core/frontend/src/components/common/WarningDialog.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue index 55dee7a808..8d59190f6c 100644 --- a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue +++ b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue @@ -198,10 +198,16 @@ export default Vue.extend({ }, param_value() { this.updateSelectedFlags() - if (this.last_sent_value === undefined) { - this.internal_new_value = this.param_value - this.internal_new_value_as_string = String(this.internal_new_value) + if ( + this.last_sent_value !== undefined + && this.internal_new_value !== this.last_sent_value + && this.param_value === this.last_sent_value + && this.param_value === this.last_sent_value + ) { + return } + this.internal_new_value = this.param_value + this.internal_new_value_as_string = String(this.internal_new_value) }, }, mounted() { @@ -307,7 +313,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/parameter-editor/LeakSetup.vue b/core/frontend/src/components/parameter-editor/LeakSetup.vue new file mode 100644 index 0000000000..d940d6812b --- /dev/null +++ b/core/frontend/src/components/parameter-editor/LeakSetup.vue @@ -0,0 +1,71 @@ + + + diff --git a/core/frontend/src/components/parameter-editor/RelaySetup.vue b/core/frontend/src/components/parameter-editor/RelaySetup.vue new file mode 100644 index 0000000000..d2aed447f0 --- /dev/null +++ b/core/frontend/src/components/parameter-editor/RelaySetup.vue @@ -0,0 +1,90 @@ + + + diff --git a/core/frontend/src/components/parameter-editor/ServoFunctionActuatorEditor.vue b/core/frontend/src/components/parameter-editor/ServoFunctionActuatorEditor.vue new file mode 100644 index 0000000000..447f75e109 --- /dev/null +++ b/core/frontend/src/components/parameter-editor/ServoFunctionActuatorEditor.vue @@ -0,0 +1,83 @@ + + + diff --git a/core/frontend/src/components/parameter-editor/ServoFunctionEditorDialog.vue b/core/frontend/src/components/parameter-editor/ServoFunctionEditorDialog.vue index 0d45c98da7..7fc5b7b44a 100644 --- a/core/frontend/src/components/parameter-editor/ServoFunctionEditorDialog.vue +++ b/core/frontend/src/components/parameter-editor/ServoFunctionEditorDialog.vue @@ -23,110 +23,11 @@ :param="param" /> - - -
- Servo Range Configuration - - - Adjust the minimum, trim, and maximum PWM values for this servo - -
-
-
-
-
-
- {{ thumbType }}: {{ getThumbValue(index) }} -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -143,30 +44,26 @@ - - diff --git a/core/frontend/src/components/parameter-editor/ServoFunctionGpioEditor.vue b/core/frontend/src/components/parameter-editor/ServoFunctionGpioEditor.vue new file mode 100644 index 0000000000..4515974f6f --- /dev/null +++ b/core/frontend/src/components/parameter-editor/ServoFunctionGpioEditor.vue @@ -0,0 +1,185 @@ + + + diff --git a/core/frontend/src/components/parameter-editor/ServoFunctionLightsEditor.vue b/core/frontend/src/components/parameter-editor/ServoFunctionLightsEditor.vue new file mode 100644 index 0000000000..a0a992ecb0 --- /dev/null +++ b/core/frontend/src/components/parameter-editor/ServoFunctionLightsEditor.vue @@ -0,0 +1,47 @@ + + + diff --git a/core/frontend/src/components/parameter-editor/ServoFunctionMotorEditor.vue b/core/frontend/src/components/parameter-editor/ServoFunctionMotorEditor.vue new file mode 100644 index 0000000000..f13b73d495 --- /dev/null +++ b/core/frontend/src/components/parameter-editor/ServoFunctionMotorEditor.vue @@ -0,0 +1,142 @@ + + + diff --git a/core/frontend/src/components/parameter-editor/ServoFunctionRangeEditor.vue b/core/frontend/src/components/parameter-editor/ServoFunctionRangeEditor.vue new file mode 100644 index 0000000000..8776bdb564 --- /dev/null +++ b/core/frontend/src/components/parameter-editor/ServoFunctionRangeEditor.vue @@ -0,0 +1,509 @@ + + + + + diff --git a/core/frontend/src/components/vehiclesetup/Configure.vue b/core/frontend/src/components/vehiclesetup/Configure.vue index 771de1007c..c75b76f982 100644 --- a/core/frontend/src/components/vehiclesetup/Configure.vue +++ b/core/frontend/src/components/vehiclesetup/Configure.vue @@ -41,10 +41,12 @@ import autopilot from '@/store/autopilot_manager' import SpinningLogo from '../common/SpinningLogo.vue' import ArdupilotAccelerometerSetup from './configuration/accelerometer/ArdupilotAccelerometerSetup.vue' +import ArdupilotVehicleBodySetup from './configuration/ArdupilotVehicleBodySetup.vue' import Camera from './configuration/camera.vue' import ArdupilotMavlinkCompassSetup from './configuration/compass/ArdupilotMavlinkCompassSetup.vue' -import FailsafesConfigration from './configuration/failsafes/Failsafes.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' @@ -71,12 +73,13 @@ export default Vue.extend({ LeakInfo, ParamSets, LightsConfigration, + PowerConfiguration, ArdupilotMavlinkCompassSetup, ArdupilotAccelerometerSetup, SpinningLogo, GyroCalib, BaroCalib, - FailsafesConfigration, + FailsafesConfiguration, Camera, NotSafeOverlay, }, @@ -84,6 +87,7 @@ export default Vue.extend({ return { pages: [ { title: 'Parameters', value: 'parameters', component: ParamSets }, + { title: 'Vehicle Body', value: 'vehiclebody', component: ArdupilotVehicleBodySetup }, { title: 'Gyroscope', value: 'gyroscope', component: GyroCalib }, { title: 'Accelerometer', value: 'accelerometer', component: ArdupilotAccelerometerSetup }, { title: 'Compass', value: 'compass', component: ArdupilotMavlinkCompassSetup }, @@ -94,7 +98,8 @@ export default Vue.extend({ component: LightsConfigration, filter: () => autopilot.vehicle_type === 'Submarine', }, - { title: 'Failsafes', value: 'failsafes', component: FailsafesConfigration }, + { title: 'Failsafes', value: 'failsafes', component: FailsafesConfiguration }, + { title: 'Power', value: 'power', component: PowerConfiguration }, { title: 'Camera Gimbal', value: 'camera', component: Camera }, ] as Item[], } @@ -112,6 +117,6 @@ export default Vue.extend({ diff --git a/core/frontend/src/components/vehiclesetup/OrientationPicker.vue b/core/frontend/src/components/vehiclesetup/OrientationPicker.vue new file mode 100644 index 0000000000..73724226be --- /dev/null +++ b/core/frontend/src/components/vehiclesetup/OrientationPicker.vue @@ -0,0 +1,493 @@ + + + + + diff --git a/core/frontend/src/components/vehiclesetup/PwmSetup.vue b/core/frontend/src/components/vehiclesetup/PwmSetup.vue index 00502c901c..39c3d1128b 100644 --- a/core/frontend/src/components/vehiclesetup/PwmSetup.vue +++ b/core/frontend/src/components/vehiclesetup/PwmSetup.vue @@ -136,7 +136,7 @@ {{ convert_servo_name(item.name) }} - {{ stringToUserFriendlyText(printParam(item)) }} + {{ parameterToUserFriendlyText(item) }} {{ servo_output[index] }} @@ -156,6 +156,7 @@ + diff --git a/core/frontend/src/components/vehiclesetup/configuration/FrameSelector.vue b/core/frontend/src/components/vehiclesetup/configuration/FrameSelector.vue new file mode 100644 index 0000000000..5d841919a2 --- /dev/null +++ b/core/frontend/src/components/vehiclesetup/configuration/FrameSelector.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/ArdupilotAccelerometerSetup.vue b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/ArdupilotAccelerometerSetup.vue index 4edd57669f..7d2ccaa14c 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/ArdupilotAccelerometerSetup.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/ArdupilotAccelerometerSetup.vue @@ -9,11 +9,11 @@ - - {{ imu.deviceName }} + + {{ accelerometer.deviceName }} @@ -26,10 +26,12 @@ > mdi-emoticon-sad-outline - {{ imu_is_calibrated[imu.param] ? 'Calibrated' : 'Needs calibration' }} + {{ ardupilot_sensors.accelerometers_calibrated[accelerometer.param] + ? 'Calibrated' + : 'Needs calibration' }} mdi-thermometer-check @@ -48,6 +50,7 @@ +
@@ -57,11 +60,10 @@ import Vue from 'vue' // eslint-disable-next-line import FullAccelerometerCalibration from '@/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue' -import autopilot_data from '@/store/autopilot' -import { Dictionary } from '@/types/common' -import decode, { deviceId } from '@/utils/deviceid_decoder' +import ardupilot_sensors, { ArdupilotSensorsStore } from '@/store/ardupilot_sensors' +import { deviceId } from '@/utils/deviceid_decoder' -import { imu_is_calibrated, imu_temperature_is_calibrated } from '../common' +import LevelHorizonCalibration from '../compass/LevelHorizonCalibration.vue' import QuickAccelerometerCalibration from './QuickAccelerometerCalibration.vue' export default Vue.extend({ @@ -69,27 +71,20 @@ export default Vue.extend({ components: { FullAccelerometerCalibration, QuickAccelerometerCalibration, + LevelHorizonCalibration, }, data() { return { } }, computed: { - imus() : deviceId[] { - return autopilot_data.parameterRegex('^INS_ACC.*_ID') - .filter((param) => param.value !== 0) - .map((parameter) => decode(parameter.name, parameter.value)) - }, - imu_is_calibrated(): Dictionary { - return imu_is_calibrated(this.imus, autopilot_data) - }, - imu_temperature_is_calibrated(): Dictionary<{ calibrated: boolean, calibrationTemperature: number }> { - return imu_temperature_is_calibrated(this.imus, autopilot_data) + ardupilot_sensors(): ArdupilotSensorsStore { + return ardupilot_sensors }, }, methods: { getCalibrationTemperature(imu: deviceId) { - return this.imu_temperature_is_calibrated[imu.param].calibrationTemperature.toFixed(0) + return ardupilot_sensors.accelerometers_temperature_calibrated[imu.param].calibrationTemperature.toFixed(0) }, }, }) diff --git a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue index 4e3dc38c72..97ed6cd4a2 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue @@ -33,6 +33,12 @@ > {{ current_state_text }} + Start Calibration @@ -50,6 +56,7 @@ - - diff --git a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/QuickAccelerometerCalibration.vue b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/QuickAccelerometerCalibration.vue index fdae5b18d2..ffe18855fd 100755 --- a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/QuickAccelerometerCalibration.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/QuickAccelerometerCalibration.vue @@ -121,7 +121,3 @@ export default { }, } - - diff --git a/core/frontend/src/components/vehiclesetup/configuration/camera.vue b/core/frontend/src/components/vehiclesetup/configuration/camera.vue index 4dfacd66db..cb88592c7e 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/camera.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/camera.vue @@ -8,8 +8,8 @@

- Camera mount setup is not supported on this Firmware (MNT1_TYPE param not found). - please update to a newer version. + Camera mount setup is not supported on this firmware (MNT1_TYPE param not found). + Please update to a newer autopilot firmware version.

- Mount is disabled. Enable it by setting the 'Gimbal Type' to 'Servo' + Mount is disabled. Enable it by setting the 'Gimbal Type' to 'Servo'.

@@ -52,7 +52,7 @@

- To find the physical limites of the servo, move the camera to the minimum and maximum positions, + To find the physical limits of the servo, move the camera to the minimum and maximum positions, then adjust the minimum/maximum PWMs values until it reaches the furthest it can move without hitting other components.

@@ -91,8 +91,9 @@

- Measure the found limits and input them below. - This will allow Ardupilot to know how to convert PWM to angle. + Measure the rotation limit angles and input them below. + This will allow Ardupilot to accurately report the camera rotation angle + from its commanded servo PWM value.

Calculated PWM/degree: {{ pwm_per_deg.toFixed(2) }}

- This represents how much the PWM value changes per degree. use this to + This represents how much the PWM value changes per degree. Use this to verify against your servo specs. One that reaches +-45º with 1100-1900 PWM (all current BlueRobotics servos), - has a ratio of 8.88us per degree. + has a ratio of 8.88µs per degree. This can help you make sure you measured the angles correctly.

diff --git a/core/frontend/src/components/vehiclesetup/configuration/common.ts b/core/frontend/src/components/vehiclesetup/configuration/common.ts deleted file mode 100755 index 8420584c19..0000000000 --- a/core/frontend/src/components/vehiclesetup/configuration/common.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { AutopilotStore } from "@/store/autopilot" -import { Dictionary } from "@/types/common" -import { deviceId } from "@/utils/deviceid_decoder" - -export function imu_is_calibrated(imus: deviceId[], autopilot_data: AutopilotStore) { - const results = {} as Dictionary - for (const imu of imus) { - const param_radix = imu.param.split('_ID')[0] - const offset_params_names = [`${param_radix}OFFS_X`, `${param_radix}OFFS_Y`, `${param_radix}OFFS_Z`] - const scale_params_names = [`${param_radix}SCAL_X`, `${param_radix}SCAL_Y`, `${param_radix}SCAL_Z`] - const offset_params = offset_params_names.map( - (name) => autopilot_data.parameter(name), - ) - const scale_params = scale_params_names.map( - (name) => autopilot_data.parameter(name), - ) - const is_at_default_offsets = offset_params.every((param) => param?.value === 0.0) - const is_at_default_scale = scale_params.every((param) => param?.value === 1.0) - results[imu.param] = offset_params.isEmpty() || scale_params.isEmpty() - || !is_at_default_offsets || !is_at_default_scale - } - return results -} - -export function imu_temperature_is_calibrated(imus: deviceId[], autopilot_data: AutopilotStore): Dictionary<{ calibrated: boolean, calibrationTemperature: number }> { - const results = {} as Dictionary<{ calibrated: boolean, calibrationTemperature: number }> - for (const imu of imus) { - let param_radix = imu.param.split('_ID')[0] - // CALTEMP parameters contains ID for the first sensor, _ID does not, so we need to add it - if (!/\d$/.test(param_radix)) { - param_radix += '1' - } - const name = `${param_radix}_CALTEMP` - const parameter = autopilot_data.parameter(name) - results[imu.param] = { - calibrated: parameter !== undefined && parameter.value !== -300, - calibrationTemperature: parameter?.value ?? 0, - } - } - return results -} diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue index 7bd442b135..ea20328104 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue @@ -38,9 +38,8 @@

- This does a full calibration of the compasses. - It requires you to spin the vehicle around manually multiple times. - You need to move the vehicle around in all 3 axis. + Perform a full calibration of the selected compass(es) by manually spinning + the vehicle around multiple times, about all 3 rotation axes.

@@ -51,10 +50,9 @@

- This does a "quick" calibration of your compass. - You need to point your vehicle North,and then click the button. - This results in a much less accurate calibration, but is also much faster. - It can be a good starting point for calibration, followed by CompassLearn. + Perform a quick, low-accuracy calibration of the compass(es) by pointing + your vehicle North, then clicking the Calibrate button. + It can be a good starting point for calibration, followed by Compass Learn.

@@ -66,9 +64,9 @@

- This allows automatic "calibration" of compass offsets. You need to have a valid world position. - In order to use this option, click the following button and then drive the vehicle around until - you see the message "CompassLearn: finished" + Automatically "learn" compass calibration offsets by driving the vehicle around until + enough data has been collected, and "CompassLearn: finished" is displayed. + A valid global region estimate is required.

@@ -79,11 +77,14 @@

- This used logs from previous flights to calibrate the compasses. + Calibrate the compass(es) using a previous flight log. This usually gives the best results. - While it is not currently implemented here. It can be done either in - Ardupilot WebTools and - LogViewer. + While it is not currently implemented here, the compass offset information can be + determined in the Log Browser page. Press the green play button on a log file, + click the three vertical dots in the sidebar, open the Mag Fit Tool, + specify the general global region where the log was created, then click "Fit" + for each compass you wish to calibrate. Resulting values can be copied across to + the COMPASS_* autopilot parameters.

@@ -122,8 +123,8 @@ - To change the order of the compasses, drag them up and down in this list using the drag handler. - This Operation requires an autopilot restart. + Click-and-drag the dots to change the priority of the compass options. + Adjusted compass priorities are applied once the autopilot restarts.
- This Compass is not in use, move it higher in the list in order to be able to use it + This Compass is not in use, drag it higher (by the dots) to be able to use it.
External/Internal: @@ -371,7 +372,7 @@ export default Vue.extend({ calibration: CalibrationType.FULL_NO_WMM, color: 'var(--v-warning-darken1)', alert: 'warning', - description: 'Calibrated, but without a known (detected or specified) global position, ' + description: 'Calibrated, but without a known (detected or specified) global region, ' + 'so no corrections were applied from the internal World Magnetic Model (WMM). ' + 'Consider retrying with a valid position to improve compass performance.', calibration_short: 'Calibrated (No WMM)', diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/AutoCoordinateDetector.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/AutoCoordinateDetector.vue index 2b3a541a2b..951e6cefd6 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/AutoCoordinateDetector.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/AutoCoordinateDetector.vue @@ -204,7 +204,3 @@ export default { }, } - - diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue index 87382c3666..06ca45a38c 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue @@ -22,12 +22,12 @@ Compass Calibration Learning - A valid position is required for Compass Learn to estimate the local world magnetic field. + A valid global region is required for Compass Learn to estimate the local world magnetic field. - Make sure you have a valid position, then click start and drive the vehicle around in - manual mode until you see the message "CompassLearn: finished" + Make sure you have a valid region/position specified, then click start and drive the vehicle around + in manual mode until you see the message "CompassLearn: finished". - - diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/CompassParams.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/CompassParams.vue index e18a1fc053..2b702c7a84 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/CompassParams.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/CompassParams.vue @@ -92,9 +92,6 @@ table { th, td { border: 1px solid #ddd; padding: 8px; -} - -th, td { cursor: pointer; } diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue index a5a947d6d1..bf078a46cf 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue @@ -20,18 +20,18 @@

- Onboard Compass Calibration is the regular calibration used - for Ardupilot vehicles. - It requires you to spin the vehicle aroung all axis, which allows it to calibrated the + Onboard Compass Calibration is the regular calibration used + for ArduPilot vehicles. + It requires spinning the vehicle around all axes, which allows it to calibrate the readings to the expected local magnetic field.

- A Valid position is recomended for Onboard Calibration to estimate the - local world magnetic field. + A valid global region/position is recomended for Onboard Calibration to + estimate the local world magnetic field.

- Spin your vehicle around all of its axis until the progress bar completes. + Spin your vehicle around all of its axes until the progress bar completes. Calibrate diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue index 9d63f24f92..f30bb403b3 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue @@ -18,7 +18,7 @@ Large Vehicle Compass Calibration - A Valid position is required for Compass Learn to estimate the local world magnetic field. + A valid global region/position is required to estimate the local world magnetic field. @@ -33,7 +33,7 @@ - + Calibrate @@ -117,7 +117,3 @@ export default { }, } - - diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/LevelHorizonCalibration.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/LevelHorizonCalibration.vue new file mode 100644 index 0000000000..e893bd7a71 --- /dev/null +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/LevelHorizonCalibration.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/core/frontend/src/components/vehiclesetup/configuration/failsafes/FailsafeCard.vue b/core/frontend/src/components/vehiclesetup/configuration/failsafes/FailsafeCard.vue index 41b6200939..5639429acf 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/failsafes/FailsafeCard.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/failsafes/FailsafeCard.vue @@ -2,6 +2,7 @@
@@ -24,7 +25,12 @@ {{ param.replacementTitle ?? param.name }} - +
@@ -74,6 +80,16 @@ export default Vue.extend({ available_params(): ParamDefinitions[] { return this.failsafeDefinition.params.filter((param) => param.name in this.params) }, + is_disabled(): boolean { + const controlParam = this.findControlParam() + if (!controlParam || !(controlParam.name in this.params)) { + return false + } + return this.params[controlParam.name].value === 0 + }, + actionParamName(): string | undefined { + return this.findControlParam()?.name + }, }, mounted() { this.loadImage() @@ -84,6 +100,18 @@ export default Vue.extend({ this.image = response.data }) }, + findControlParam(): ParamDefinitions | undefined { + const enableParam = this.failsafeDefinition.params.find( + (p) => p.replacementTitle === 'Enable' || p.name.includes('_ENABLE'), + ) + if (enableParam) { + return enableParam + } + + return this.failsafeDefinition.params.find( + (p) => p.replacementTitle === 'Action', + ) + }, }, }) @@ -106,4 +134,35 @@ i.svg-icon svg { text-align: end; margin: auto; } + +.disabled-failsafe { + border: 1px solid var(--v-warning-base) !important; + position: relative; +} + +.disabled-failsafe:hover { + border-color: var(--v-warning-lighten1) !important; + box-shadow: 0 2px 8px rgba(224, 166, 0, 0.2); +} + +.disabled-failsafe::after { + content: 'DISABLED'; + position: absolute; + top: 8px; + right: 8px; + background-color: var(--v-warning-base); + color: white; + padding: 3px 6px; + border-radius: 3px; + font-size: 9px; + font-weight: 600; + letter-spacing: 0.5px; + z-index: 2; + pointer-events: none; +} + +.disabled-failsafe .svg-icon { + opacity: 0.7; + filter: grayscale(30%); +} diff --git a/core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue b/core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue index 2e64156409..f7f24314cf 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue @@ -1,6 +1,6 @@