From ee968ce27d3d2c84a4dfd069d51fd76780c719a8 Mon Sep 17 00:00:00 2001 From: Varun Date: Tue, 28 Jan 2025 11:27:39 +0530 Subject: [PATCH] changes --- src/controllers/tanksController.js | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 09bbee2a..93fed795 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -5353,17 +5353,17 @@ client.on('message', async (topic, message) => { inputConnection.motor_on_type = "forced_manual"; inputConnection.startTime = currentTime; // Emit motor start notification with tankName - eventEmitter.emit( - "sendMotorStartNotification", - fcmToken, // FCM tokens - hw_Id, // Motor ID - inputConnection.water_level || 0, // Water level - motorTank.blockName || "N/A", // Block name - tankName, // Tank name - inputConnection.motor_on_type, // Motor on type - "threshold", // Stop criteria - manual_threshold_time // Threshold time in mins - ); + // eventEmitter.emit( + // "sendMotorStartNotification", + // fcmToken, // FCM tokens + // hw_Id, // Motor ID + // inputConnection.water_level || 0, // Water level + // motorTank.blockName || "N/A", // Block name + // tankName, // Tank name + // inputConnection.motor_on_type, // Motor on type + // "threshold", // Stop criteria + // manual_threshold_time // Threshold time in mins + // ); } @@ -5371,15 +5371,15 @@ client.on('message', async (topic, message) => { inputConnection.motor_stop_status = "1"; // Emit motor stop notification with tankName - eventEmitter.emit( - "sendMotorStopNotification", - fcmToken, // FCM tokens - hw_Id, // Motor ID - inputConnection.water_level || 0, // Water level - motorTank.blockName || "N/A", // Block name - tankName, // Tank name - inputConnection.motor_on_type // Motor on type - ); + // eventEmitter.emit( + // "sendMotorStopNotification", + // fcmToken, // FCM tokens + // hw_Id, // Motor ID + // inputConnection.water_level || 0, // Water level + // motorTank.blockName || "N/A", // Block name + // tankName, // Tank name + // inputConnection.motor_on_type // Motor on type + // ); } await motorTank.save(); // Save the updated tank