diff --git a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue index 0e9ceec851..2666a62e05 100644 --- a/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue +++ b/core/frontend/src/components/parameter-editor/InlineParameterEditor.vue @@ -67,6 +67,7 @@ import Vue, { PropType } from 'vue' import mavlink2rest from '@/libs/MAVLink2Rest' import autopilot_data from '@/store/autopilot' import Parameter from '@/types/autopilot/parameter' +import { Dictionary } from '@/types/common' export default Vue.extend({ name: 'InlineParameterEditor', @@ -95,6 +96,10 @@ export default Vue.extend({ type: Boolean, default: false, }, + metadataOverrides: { + type: Object as PropType>, + default: () => ({}), + }, }, data() { return { @@ -111,6 +116,13 @@ export default Vue.extend({ const entries = Object.entries(this.param?.options ?? []) const value_is_known = Object.keys(this.param?.options ?? []).map(parseFloat).includes(this.param?.value) const options = entries.map(([value, name]) => ({ text: name, value: parseFloat(value), disabled: false })) + // replace entries in metadataOverrides + for (const [value, _name] of entries) { + if (value in this.metadataOverrides) { + const index = options.findIndex((option) => option.value === parseFloat(value)) + options[index].text = this.metadataOverrides[value] + } + } if (!value_is_known) { options.push({ text: `Custom: ${this.param?.value}`, value: this.param?.value, disabled: false }) } diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue index 7bd442b135..acd00d09df 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue @@ -1,30 +1,13 @@