From f514395ce73219169b997f6147a605350a70daa7 Mon Sep 17 00:00:00 2001 From: Varun Date: Wed, 11 Dec 2024 11:36:16 +0530 Subject: [PATCH 1/2] changes in tanks controller --- src/controllers/tanksController.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index aebf5135..e71574b7 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -1981,6 +1981,7 @@ else if (currentWaterLevel >= highWaterThreshold) { const stopTime = req.body.stopTime || new Date().toISOString(); const motorOnType = req.body.motor_on_type || "manual"; if (action === "start") { + motorStopStatus = "2"; const startTime = req.body.startTime; const stopCriteria = motorOnType === "time" @@ -2109,6 +2110,7 @@ else if (currentWaterLevel >= highWaterThreshold) { { $set: { [`connections.inputConnections.${index}.manual_threshold_time`]: req.body.manual_threshold_time, + [`connections.inputConnections.${index}.threshold_type`]: "time", [`connections.inputConnections.${index}.startTime`]: req.body.startTime, [`connections.inputConnections.${index}.start_instance_id`]: start_instance_id } From 21561c617665ac785bbd9b1e43cee7a59c252f83 Mon Sep 17 00:00:00 2001 From: Varun Date: Wed, 11 Dec 2024 11:37:03 +0530 Subject: [PATCH 2/2] changes in motoraction --- src/controllers/tanksController.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index e71574b7..f3b00255 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -1981,6 +1981,7 @@ else if (currentWaterLevel >= highWaterThreshold) { const stopTime = req.body.stopTime || new Date().toISOString(); const motorOnType = req.body.motor_on_type || "manual"; if (action === "start") { + motorStopStatus = "2"; const startTime = req.body.startTime; const stopCriteria =