|
|
@ -168,7 +168,7 @@ exports.updateTanklevels = async (req, reply) => {
|
|
|
|
const newWaterLevel = Math.floor(waterLevel - 200);
|
|
|
|
const newWaterLevel = Math.floor(waterLevel - 200);
|
|
|
|
console.log("motorstatus:"+motorStatus)
|
|
|
|
console.log("motorstatus:"+motorStatus)
|
|
|
|
|
|
|
|
|
|
|
|
if (newWaterLevel <= 0,motorStatus === "1") {
|
|
|
|
if (newWaterLevel <= 0 || motorStatus === "1") {
|
|
|
|
clearInterval(intervals[tankId]);
|
|
|
|
clearInterval(intervals[tankId]);
|
|
|
|
console.log(`Stopped updating tank with ID ${tankId}`);
|
|
|
|
console.log(`Stopped updating tank with ID ${tankId}`);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|