From c1d58e7c28794e2f5424d1e835bfb4ddb90f1754 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Fri, 8 Dec 2023 14:20:14 -0300 Subject: [PATCH 1/3] joystick-config-view: Improve joystick image reload logic This way the joystick does not disappear during the process. --- src/stores/controller.ts | 2 +- src/views/ConfigurationJoystickView.vue | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/stores/controller.ts b/src/stores/controller.ts index a198d41ec..4fd4ab8c2 100644 --- a/src/stores/controller.ts +++ b/src/stores/controller.ts @@ -128,7 +128,7 @@ export const useControllerStore = defineStore('controller', () => { }) protocolMapping.value.buttonsCorrespondencies[v.modKey][v.button].action = otherAvailableActions.no_function }) - }, 1000) + }, 500) // If there's a mapping in our database that is not on the user storage, add it to the user // This will happen whenever a new joystick profile is added to Cockpit's database diff --git a/src/views/ConfigurationJoystickView.vue b/src/views/ConfigurationJoystickView.vue index e687257ed..8944aa161 100644 --- a/src/views/ConfigurationJoystickView.vue +++ b/src/views/ConfigurationJoystickView.vue @@ -203,7 +203,7 @@ From 5d6fb714954b799f3c106458d357274ccaeb8224 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Fri, 8 Dec 2023 14:21:21 -0300 Subject: [PATCH 3/3] joystick-config-view: Only show axis-related component when axis in present in the input --- src/views/ConfigurationJoystickView.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/ConfigurationJoystickView.vue b/src/views/ConfigurationJoystickView.vue index d8401bedd..3bda7a63f 100644 --- a/src/views/ConfigurationJoystickView.vue +++ b/src/views/ConfigurationJoystickView.vue @@ -161,8 +161,10 @@ {{ buttonFunctionAssignmentFeedback }}

-
-

Axis mapping

+
{{ [JoystickAxis.A0, JoystickAxis.A2].includes(input.id) ? 'mdi-pan-horizontal' : 'mdi-pan-vertical' }}