From 44fa88e3dc79cd6c102320b856ab97ee45edc406 Mon Sep 17 00:00:00 2001 From: Varun Date: Fri, 3 Jan 2025 16:32:23 +0530 Subject: [PATCH] changes in motoraction --- src/controllers/tanksController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index ba04343e..2502fd2f 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -3471,13 +3471,16 @@ exports.IotDeviceforstandalonedevice = async (req, reply) => { message: 'Motor not found for the specified motor_id' }); } - + console.log(hardwareId,"hardwareId") + console.log(status,"status") // Find the inputConnection with the specified motor_id const inputConnection = tank.connections.inputConnections.find(conn => conn.motor_id === hardwareId); if (inputConnection) { // Update the motor_status of the inputConnection inputConnection.motor_status = status; + console.log(inputConnection) + // Check if motor_stop_status is "1" and status is "2" if (inputConnection.motor_stop_status === "1" && status === "2") {