mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:27:09 +00:00
Modify full volume detection on Smartsource
The Smartsource firmware seems to have changed rendering the old test invalid.
This commit is contained in:
@@ -53,13 +53,13 @@ class DetectSoftStart {
|
|||||||
meta: {auto: true, author: `*${this.constructor.name}*`}
|
meta: {auto: true, author: `*${this.constructor.name}*`}
|
||||||
};
|
};
|
||||||
DEBUG("Posting event", projectId, payload);
|
DEBUG("Posting event", projectId, payload);
|
||||||
} else if (cur.num_active == cur.num_guns && prev.num_active < cur.num_active) {
|
|
||||||
if (ctx.dryRun) {
|
if (ctx.dryRun) {
|
||||||
DEBUG(`DRY RUN: await ctx.db.event.post(${projectId}, ${payload});`);
|
DEBUG(`DRY RUN: await ctx.db.event.post(${projectId}, ${payload});`);
|
||||||
} else {
|
} else {
|
||||||
await ctx.db.event.post(projectId, payload);
|
await ctx.db.event.post(projectId, payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if ((cur.num_active == cur.num_guns || (prev.num_nofire > 0 && cur.num_nofire == 0)) && prev.num_active < cur.num_active) {
|
||||||
INFO("Full volume detected @", cur.tstamp);
|
INFO("Full volume detected @", cur.tstamp);
|
||||||
|
|
||||||
const projectId = await ctx.schema2pid(cur._schema ?? prev._schema);
|
const projectId = await ctx.schema2pid(cur._schema ?? prev._schema);
|
||||||
|
|||||||
Reference in New Issue
Block a user