From d4d351771ef7bfa454be9c6885a45c67c7d0cbde Mon Sep 17 00:00:00 2001 From: Robert Kossessa Date: Thu, 6 Jun 2024 16:41:50 +0200 Subject: [PATCH] FIX: Midi Value creation --- .../src/components/config/values/ValueGroup.vue | 2 +- src/renderer/src/deviceStore.ts | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/components/config/values/ValueGroup.vue b/src/renderer/src/components/config/values/ValueGroup.vue index eccf1f8..c512200 100644 --- a/src/renderer/src/components/config/values/ValueGroup.vue +++ b/src/renderer/src/components/config/values/ValueGroup.vue @@ -21,7 +21,7 @@ diff --git a/src/renderer/src/deviceStore.ts b/src/renderer/src/deviceStore.ts index 41d7d6b..18e9d21 100644 --- a/src/renderer/src/deviceStore.ts +++ b/src/renderer/src/deviceStore.ts @@ -118,6 +118,12 @@ const { nanoIpc } = window const messageCallbacks: ((title: string, message: string) => void)[] = [] +const createUpdateArray = (index: number, value) => { + const arr = Array(index + 1).fill({}) + arr[index] = value + return arr +} + export const useDeviceStore = defineStore('device', { state: () => ({ attachedDeviceIds: [] as string[], // list of attached device ids @@ -145,9 +151,12 @@ export const useDeviceStore = defineStore('device', { haptic: { mode: 0, startPos: 0, - endPos: Math.PI * 2, - detentCount: 10, - vernier: 10 + endPos: 127, + detentCount: 127, + vernier: 0, + kxForce: 0, + outputRamp: 200, + detentStrength: 4 } } as Value, defaultKeyAction: { type: 'next_profile' } as Action,