From 9365397b1ac8f9011be3bf5e57a6387ed8f7c8b4 Mon Sep 17 00:00:00 2001 From: velvettear Date: Thu, 24 Mar 2022 15:13:19 +0100 Subject: [PATCH] possibly fixed bypass --- libs/modep.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/modep.js b/libs/modep.js index 9e23c09..7a917b7 100644 --- a/libs/modep.js +++ b/libs/modep.js @@ -428,12 +428,13 @@ async function toggleBypass(pedalId) { } const pedal = await getCurrentPedalById(pedalId); const bypass = getBypassControlFromPedal(pedal); - let value = 0; if (bypass.value === undefined || bypass.value === 0) { - value = 127; + bypass.value = 127; + } else { + bypass.value = 0; } try { - await setControl(bypass, value); + await setControl(bypass, bypass.value); blinky.setPedalStatus(pedal); } catch (err) { throw new Error('could not toggle bypass for pedal ' + pedal.name + ' with id \'' + pedal.id + '\' > ' + err);