diff --git a/src/lib/serial/chord.ts b/src/lib/serial/chord.ts index 7fd06cd7..6e342bd8 100644 --- a/src/lib/serial/chord.ts +++ b/src/lib/serial/chord.ts @@ -48,9 +48,7 @@ export function deserializeActions(native: bigint): number[] { const actions = [] for (let i = 0; i < 12; i++) { const action = Number(native & 0x3ffn) - if (action !== 0) { - actions.push(action) - } + actions.push(action) native >>= 10n } diff --git a/src/routes/config/chords/ChordActionEdit.svelte b/src/routes/config/chords/ChordActionEdit.svelte index fcbdf48c..385e9a43 100644 --- a/src/routes/config/chords/ChordActionEdit.svelte +++ b/src/routes/config/chords/ChordActionEdit.svelte @@ -66,12 +66,19 @@ }) }) } + + $: chordActions = chord?.actions.slice(chord.actions.lastIndexOf(0) + 1).toSorted(compare) + $: compoundIndices = chord?.actions.slice(0, chord.actions.indexOf(0)) + + $: { + console.log(chord?.actions, chordActions, compoundIndices) + }