From 216daf1e38a879dba15e998b87e7a5d55802ebfa Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 3 Dec 2022 19:59:12 -0500 Subject: [PATCH] Add missing variables --- functions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.js b/functions.js index dda1911..47a28f6 100644 --- a/functions.js +++ b/functions.js @@ -45,11 +45,11 @@ const functions = { }, // Cycles the auger using the two functions above this one (functions.auger.on() and functions.auger.off()) // Sleeps in between cycles using functions.sleep() - cycle() { + cycle(gpio) { return new Promise((resolve) => { - this.on().then(() => { + this.on(gpio).then(() => { functions.sleep(process.env.ONTIME).then(() => { - this.off().then(() => { + this.off(gpio).then(() => { functions.sleep(process.env.OFFTIME).then(() => { resolve("Cycle complete."); });