master^2
Bhaskar 7 months ago
parent 927f501572
commit 1ece7f295b

@ -2861,7 +2861,7 @@ exports.motorAction = async (req, reply) => {
let motorStopStatus = action === "start" ? "2" : "1";
const blockName = req.body.from || "Unknown Block";
const tankName = req.body.to || "Unknown Tank";
const stopTime = req.body.stopTime
if (action === "start") {
motorStopStatus = "2";
const startTime = req.body.startTime;
@ -2870,10 +2870,10 @@ exports.motorAction = async (req, reply) => {
{ $set: { "connections.inputConnections.$.motor_stop_status": motorStopStatus } }
);
const thresholdTimeMs = req.body.manual_threshold_time * 60 * 1000; // Convert minutes to milliseconds
const stopCriteria =
motorOnType === "time"
? `${req.body.manual_threshold_time} minutes`
: `${req.body.manual_threshold_litres} litres`;
// const stopCriteria =
// motorOnType === "time"
// ? `${req.body.manual_threshold_time} minutes`
// : `${req.body.manual_threshold_litres} litres`;
try {
console.log("enter the start")
eventEmitter.emit(

Loading…
Cancel
Save