can now have multiple triggers
+ Pattern.log now makes sense
This commit is contained in:
parent
27fb2d2d5b
commit
ff5d14fb63
9 changed files with 32 additions and 22 deletions
|
|
@ -17,12 +17,14 @@ export function repl({
|
|||
interval,
|
||||
onTrigger: async (hap, deadline, duration) => {
|
||||
try {
|
||||
if (!hap.context.onTrigger) {
|
||||
return await defaultOutput(hap, deadline, duration);
|
||||
if (!hap.context.onTrigger || !hap.context.dominantTrigger) {
|
||||
await defaultOutput(hap, deadline, duration);
|
||||
}
|
||||
if (hap.context.onTrigger) {
|
||||
const cps = 1;
|
||||
// call signature of output / onTrigger is different...
|
||||
await hap.context.onTrigger(getTime() + deadline, hap, getTime(), cps);
|
||||
}
|
||||
const cps = 1; // TODO: fix
|
||||
// call signature of output / onTrigger is different...
|
||||
return await hap.context.onTrigger(getTime() + deadline, hap, getTime(), cps);
|
||||
} catch (err) {
|
||||
logger(`[cyclist] error: ${err.message}`, 'error');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue