From 55fbe3b59adf18dff3fc0350f4536c46b1425f2b Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Wed, 19 Feb 2025 11:26:03 -0300 Subject: [PATCH] PwmSetup:: add servoToHighlight function and map for handling newer ardusub version functions in highlighting --- core/frontend/src/components/vehiclesetup/PwmSetup.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/components/vehiclesetup/PwmSetup.vue b/core/frontend/src/components/vehiclesetup/PwmSetup.vue index 9e5628e499..acc5ca969b 100644 --- a/core/frontend/src/components/vehiclesetup/PwmSetup.vue +++ b/core/frontend/src/components/vehiclesetup/PwmSetup.vue @@ -128,7 +128,7 @@ v-for="(item, index) in servo_function_parameters" :key="item.name" style="cursor: pointer;" - @mouseover="highlight = [stringToUserFriendlyText(printParam(item))]" + @mouseover="highlight = [servoToHighlight(item)]" @mouseleave="highlight = default_highlight" @click="showParamEdit(item)" > @@ -426,6 +426,14 @@ export default Vue.extend({ const left = percent < 0 ? 50 + percent : 50 return `width: ${Math.abs(percent)}%; left: ${left}%; background-color: red` }, + servoToHighlight(param: Parameter): string { + const pretty_name = this.stringToUserFriendlyText(printParam(param)) + // map for backwards compatibility + const map: Record = { + Mount1Pitch: 'MountTilt', + } + return map[pretty_name] ?? pretty_name + }, showParamEdit(param: Parameter) { this.selected_param = param this.edit_param_dialog = true