From 9576483df38fbb185c265d8d0e20120952355f6e Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Wed, 24 Jul 2024 18:37:40 -0300 Subject: [PATCH 1/4] frontend: themedSvg: add watcher for url --- core/frontend/src/components/utils/themedSVG.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/frontend/src/components/utils/themedSVG.vue b/core/frontend/src/components/utils/themedSVG.vue index f0afd94bf6..0f059f5b8f 100644 --- a/core/frontend/src/components/utils/themedSVG.vue +++ b/core/frontend/src/components/utils/themedSVG.vue @@ -31,6 +31,15 @@ export default Vue.extend({ return `mr-0 ${settings.is_dark_theme ? 'svg-outline-dark' : 'svg-outline-light'}` }, }, + watch: { + src() { + axios.get(this.src).then((response) => { + this.image = response.data + }).catch((error) => { + console.error(error) + }) + }, + }, mounted() { axios.get(this.src).then((response) => { this.image = response.data From ac283d1abf1564e116b146484e721377b5dda2ea Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Wed, 24 Jul 2024 15:13:50 -0300 Subject: [PATCH 2/4] frontend: add basic camera gimbal setup --- .../img/configuration/camera/gimbal-pitch.svg | 181 ++++++++++++++ .../src/components/vehiclesetup/Configure.vue | 3 + .../vehiclesetup/configuration/camera.vue | 225 ++++++++++++++++++ 3 files changed, 409 insertions(+) create mode 100644 core/frontend/src/assets/img/configuration/camera/gimbal-pitch.svg create mode 100644 core/frontend/src/components/vehiclesetup/configuration/camera.vue diff --git a/core/frontend/src/assets/img/configuration/camera/gimbal-pitch.svg b/core/frontend/src/assets/img/configuration/camera/gimbal-pitch.svg new file mode 100644 index 0000000000..1d42037d42 --- /dev/null +++ b/core/frontend/src/assets/img/configuration/camera/gimbal-pitch.svg @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FOV + Max + Neutral + Min + + diff --git a/core/frontend/src/components/vehiclesetup/Configure.vue b/core/frontend/src/components/vehiclesetup/Configure.vue index 8530e73139..8adcb13244 100644 --- a/core/frontend/src/components/vehiclesetup/Configure.vue +++ b/core/frontend/src/components/vehiclesetup/Configure.vue @@ -39,6 +39,7 @@ import autopilot from '@/store/autopilot_manager' import SpinningLogo from '../common/SpinningLogo.vue' import ArdupilotAccelerometerSetup from './configuration/accelerometer/ArdupilotAccelerometerSetup.vue' +import Camera from './configuration/camera.vue' import ArdupilotMavlinkCompassSetup from './configuration/compass/ArdupilotMavlinkCompassSetup.vue' import FailsafesConfigration from './configuration/failsafes/Failsafes.vue' import LightsConfigration from './configuration/lights.vue' @@ -74,6 +75,7 @@ export default Vue.extend({ GyroCalib, BaroCalib, FailsafesConfigration, + Camera, }, data() { return { @@ -90,6 +92,7 @@ export default Vue.extend({ filter: () => autopilot.vehicle_type === 'Submarine', }, { title: 'Failsafes', value: 'failsafes', component: FailsafesConfigration }, + { title: 'Camera Gimbal', value: 'camera', component: Camera }, ] as Item[], } }, diff --git a/core/frontend/src/components/vehiclesetup/configuration/camera.vue b/core/frontend/src/components/vehiclesetup/configuration/camera.vue new file mode 100644 index 0000000000..4f50118ae7 --- /dev/null +++ b/core/frontend/src/components/vehiclesetup/configuration/camera.vue @@ -0,0 +1,225 @@ + + + + + + From 7e083476e5146295844635ed13373c6828cd2320 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Fri, 23 Aug 2024 14:11:54 -0300 Subject: [PATCH 3/4] frontend: InlineParameterEditor: improve autocomplete component, add auto-refresh prop --- .../parameter-editor/InlineParameterEditor.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue index da36c83dad..0e9ceec851 100644 --- a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue +++ b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue @@ -20,7 +20,9 @@ v-else-if="!custom_input && Object.entries(param?.options ?? []).length > 10" v-model.number="internal_new_value" variant="solo" + :loading="waiting_for_param_update" :items="as_select_items" + :label="label" /> Date: Fri, 23 Aug 2024 14:12:47 -0300 Subject: [PATCH 4/4] frontend: ThemedSVG: add css rules for text, too --- core/frontend/src/components/utils/themedSVG.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/frontend/src/components/utils/themedSVG.vue b/core/frontend/src/components/utils/themedSVG.vue index 0f059f5b8f..739fa3d844 100644 --- a/core/frontend/src/components/utils/themedSVG.vue +++ b/core/frontend/src/components/utils/themedSVG.vue @@ -63,4 +63,12 @@ i.svg-outline-dark path { i.svg-outline-light path { fill: #002F45; } + +i.svg-outline-dark text { + fill: #D1EAF1 !important; +} + +i.svg-outline-light text { + fill: #002F45 !important; +}