fix seconds
Took 3 minutes
This commit is contained in:
parent
85ea181daf
commit
a84857a010
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/public/images/
|
/public/images/
|
||||||
/config.json
|
/config.json
|
||||||
|
/yarn-error.log
|
@ -27,6 +27,7 @@ const log = debug("itender:station");
|
|||||||
const mixLog = debug("itender:mix");
|
const mixLog = debug("itender:mix");
|
||||||
|
|
||||||
export class iTender {
|
export class iTender {
|
||||||
|
private static secondsPer100ml: number = 10;
|
||||||
|
|
||||||
static get drinks(): IDrink[] {
|
static get drinks(): IDrink[] {
|
||||||
return this._drinks;
|
return this._drinks;
|
||||||
@ -110,7 +111,7 @@ export class iTender {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
x.container = c;
|
x.container = c;
|
||||||
let estimated = Settings.get("secondsPer100ml") as number / 100 * x.amount;
|
let estimated = iTender.secondsPer100ml / 100 * x.amount;
|
||||||
if (job.estimatedTime < estimated)
|
if (job.estimatedTime < estimated)
|
||||||
job.estimatedTime = estimated;
|
job.estimatedTime = estimated;
|
||||||
|
|
||||||
@ -153,7 +154,7 @@ export class iTender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let waitTime = (Settings.get("secondsPer100ml") as number) / 100 * x.amount * 1000;
|
let waitTime = (iTender.secondsPer100ml as number) / 100 * x.amount * 1000;
|
||||||
mixLog(`Starting output of pump ${x.container.pumpPin}`);
|
mixLog(`Starting output of pump ${x.container.pumpPin}`);
|
||||||
//mixLog(x.ingredient + " takes " + (waitTime / 1000) + "s for " + x.amount + "ml");
|
//mixLog(x.ingredient + " takes " + (waitTime / 1000) + "s for " + x.amount + "ml");
|
||||||
let timer = setTimeout(async () => {
|
let timer = setTimeout(async () => {
|
||||||
|
3684
yarn-error.log
3684
yarn-error.log
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user