From 9ef858cc9489f8cd410a52d3684fcea5f48bb257 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 3 Dec 2022 18:20:38 -0500 Subject: [PATCH] Bugfixes --- functions.js | 7 +++---- package-lock.json | 28 ++++++++++++++++++++++++++++ package.json | 8 ++++++++ 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json diff --git a/functions.js b/functions.js index 536c18b..45adc23 100644 --- a/functions.js +++ b/functions.js @@ -15,7 +15,7 @@ const functions = { if (err) throw err; console.log('Auger GPIO Ready'); return; - } + }, // Turns the auger on (Pin 7 high) on() { gpio.write(7, true, function(err) { @@ -63,7 +63,7 @@ const functions = { commands: { pause() { console.log('Paused...'); - await this.sleep(process.env.PAUSETIME); + this.sleep(process.env.PAUSETIME).then(() => { return; }); return; }, reload() { @@ -97,9 +97,8 @@ const functions = { console.log('Environment variables:'); console.log(`ONTIME=${process.env.ONTIME}\nOFFTIME=${process.env.OFFTIME}\nPAUSETIME=${process.env.PAUSETIME}\nDEBUG=${process.env.DEBUG}`); return true; - } + }, } -} module.exports = { functions } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..eef442a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,28 @@ +{ + "name": "pscontrolpanel", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "pscontrolpanel", + "dependencies": { + "dotenv": "^16.0.3" + } + }, + "node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "engines": { + "node": ">=12" + } + } + }, + "dependencies": { + "dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..869b739 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "pscontrolpanel", + "requires": true, + "packages": {}, + "dependencies": { + "dotenv": "^16.0.3" + } +}