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