master^2
Varun 7 months ago
parent e48f592e95
commit 296e8c6ba9

@ -2978,7 +2978,7 @@ exports.motorAction = async (req, reply) => {
const currentWaterLevel = parseInt(supplierTank.waterlevel, 10);
const currentWaterPercentage = (currentWaterLevel / parseInt(supplierTank.capacity.replace(/,/g, ''), 10)) * 100;
const notificationTracker = new Map();
if (new Date() >= thresholdTime || currentWaterPercentage <= lowWaterThreshold) {
if (new Date() >= motorIntervals[motorId].thresholdTime || currentWaterPercentage <= lowWaterThreshold) {
console.log(new Date(),"new date")
console.log(thresholdTime,"thresholdTime")
console.log("motor stopping because it entered this condition")
@ -3133,7 +3133,7 @@ exports.motorAction = async (req, reply) => {
// }
}, 30000); // Check every minute
thresholdTime
}
else if (req.body.threshold_type === "litres") {
console.log("entered litres")

Loading…
Cancel
Save