From bb9dbc01f2f12345cbeb4727b18842231aae8cc5 Mon Sep 17 00:00:00 2001 From: Varun Date: Thu, 19 Dec 2024 13:51:30 +0530 Subject: [PATCH] test for stopping motor --- src/controllers/tanksController.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 1c7ea167..495e5b38 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -2132,6 +2132,8 @@ else if (currentWaterLevel >= highWaterThreshold) { const currentWaterPercentage = (currentWaterLevel / parseInt(supplierTank.capacity.replace(/,/g, ''), 10)) * 100; if (new Date() >= thresholdTime || currentWaterPercentage <= lowWaterThreshold) { + console.log(new Date(),"new date") + console.log(thresholdTime,"thresholdTime") console.log("motor stopping because it entered this condition") await Tank.updateOne( { customerId, "connections.inputConnections.motor_id": motorId },