|
|
@ -2132,6 +2132,8 @@ else if (currentWaterLevel >= highWaterThreshold) {
|
|
|
|
const currentWaterPercentage = (currentWaterLevel / parseInt(supplierTank.capacity.replace(/,/g, ''), 10)) * 100;
|
|
|
|
const currentWaterPercentage = (currentWaterLevel / parseInt(supplierTank.capacity.replace(/,/g, ''), 10)) * 100;
|
|
|
|
|
|
|
|
|
|
|
|
if (new Date() >= thresholdTime || currentWaterPercentage <= lowWaterThreshold) {
|
|
|
|
if (new Date() >= thresholdTime || currentWaterPercentage <= lowWaterThreshold) {
|
|
|
|
|
|
|
|
console.log(new Date(),"new date")
|
|
|
|
|
|
|
|
console.log(thresholdTime,"thresholdTime")
|
|
|
|
console.log("motor stopping because it entered this condition")
|
|
|
|
console.log("motor stopping because it entered this condition")
|
|
|
|
await Tank.updateOne(
|
|
|
|
await Tank.updateOne(
|
|
|
|
{ customerId, "connections.inputConnections.motor_id": motorId },
|
|
|
|
{ customerId, "connections.inputConnections.motor_id": motorId },
|
|
|
|