From c770c5cce8778241b2dbf2446163009d59fc7140 Mon Sep 17 00:00:00 2001 From: Tobias Hopp Date: Mon, 28 Nov 2022 11:42:33 +0100 Subject: [PATCH] try fix Took 5 minutes --- src/iTender.ts | 3 +++ src/main.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/iTender.ts b/src/iTender.ts index 210515d..6ef0d5c 100644 --- a/src/iTender.ts +++ b/src/iTender.ts @@ -144,7 +144,10 @@ export class iTender { for (let x of job.amounts) { // Start pump here try { + console.log(x.container); + console.log("x1"); await GPIO.setup(x.container.pumpPin, GPIO.DIR_OUT); + console.log("x2"); await GPIO.write(x.container.pumpPin, true); } catch (e) { if (isPI()) { diff --git a/src/main.ts b/src/main.ts index 28c6836..61944ef 100644 --- a/src/main.ts +++ b/src/main.ts @@ -57,9 +57,9 @@ const wsApp = new WebsocketApp(); })(); function init(): Promise { - log("Initializing..."); - return new Promise(async resolve => { + return new Promise(async resolve => { + log("Initializing..."); setTimeout( async () => { // Network await iTender.checkNetwork();