From 02ccd4758865ce44f571b281696754795d572a33 Mon Sep 17 00:00:00 2001 From: varun Date: Fri, 5 May 2023 07:45:26 -0400 Subject: [PATCH] made changes in tanks controller --- src/controllers/tanksController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index f71f8894..87286d0c 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -168,7 +168,7 @@ exports.updateTanklevels = async (req, reply) => { const newWaterLevel = Math.floor(waterLevel - 200); console.log("motorstatus:"+motorStatus) - if (newWaterLevel <= 0,motorStatus === "1") { + if (newWaterLevel <= 0 || motorStatus === "1") { clearInterval(intervals[tankId]); console.log(`Stopped updating tank with ID ${tankId}`); return;