sync without cyclist changes
This commit is contained in:
parent
077556e7cb
commit
d9e44dcda6
8 changed files with 261 additions and 82 deletions
|
|
@ -244,16 +244,16 @@ export function repl({
|
|||
|
||||
export const getTrigger =
|
||||
({ getTime, defaultOutput }) =>
|
||||
async (hap, deadline, duration, cps, t) => {
|
||||
async (hap, deadline, duration, cps, t, cycle = 0) => {
|
||||
// ^ this signature is different from hap.context.onTrigger, as set by Pattern.onTrigger(onTrigger)
|
||||
// TODO: get rid of deadline after https://codeberg.org/uzu/strudel/pulls/1004
|
||||
try {
|
||||
if (!hap.context.onTrigger || !hap.context.dominantTrigger) {
|
||||
await defaultOutput(hap, deadline, duration, cps, t);
|
||||
await defaultOutput(hap, deadline, duration, cps, t, cycle);
|
||||
}
|
||||
if (hap.context.onTrigger) {
|
||||
// call signature of output / onTrigger is different...
|
||||
await hap.context.onTrigger(hap, getTime(), cps, t);
|
||||
await hap.context.onTrigger(hap, getTime(), cps, t, cycle);
|
||||
}
|
||||
} catch (err) {
|
||||
logger(`[cyclist] error: ${err.message}`, 'error');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue