possibly fixed bypass
This commit is contained in:
parent
2e5bdddd15
commit
9365397b1a
1 changed files with 4 additions and 3 deletions
|
@ -428,12 +428,13 @@ async function toggleBypass(pedalId) {
|
||||||
}
|
}
|
||||||
const pedal = await getCurrentPedalById(pedalId);
|
const pedal = await getCurrentPedalById(pedalId);
|
||||||
const bypass = getBypassControlFromPedal(pedal);
|
const bypass = getBypassControlFromPedal(pedal);
|
||||||
let value = 0;
|
|
||||||
if (bypass.value === undefined || bypass.value === 0) {
|
if (bypass.value === undefined || bypass.value === 0) {
|
||||||
value = 127;
|
bypass.value = 127;
|
||||||
|
} else {
|
||||||
|
bypass.value = 0;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await setControl(bypass, value);
|
await setControl(bypass, bypass.value);
|
||||||
blinky.setPedalStatus(pedal);
|
blinky.setPedalStatus(pedal);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error('could not toggle bypass for pedal ' + pedal.name + ' with id \'' + pedal.id + '\' > ' + err);
|
throw new Error('could not toggle bypass for pedal ' + pedal.name + ' with id \'' + pedal.id + '\' > ' + err);
|
||||||
|
|
Loading…
Reference in a new issue