From 2c5dd9f475e6373f76cec56ee3e7011a702dd1dd Mon Sep 17 00:00:00 2001 From: varun Date: Thu, 16 Mar 2023 05:42:31 -0400 Subject: [PATCH] start and stop --- src/controllers/tanksController.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 9291627f..90529cbd 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -375,6 +375,7 @@ exports.motorAction = async (req, reply) => { console.log(rcvr_info.motor_status) const newWaterLevel = receiver_waterlevel+450; console.log(newWaterLevel,"2",receiver_tank_info.tankName) + // Check if updating should stop if ((newWaterLevel/receiver_capacity)*100 >= 97 || (newWaterLevel/receiver_capacity)*100 >= desired_water_percentage || rcvr_info.motor_status === "0" ) {