diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index da70a65a..25ac71ba 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -8314,6 +8314,9 @@ exports.compareMeasuredHeight = async (req, reply) => { sensorGapCm = Math.round(tankHeightFromSensor); sensorWaterLevelInCm = Math.max(0, tankHeightInCmFromDB - sensorGapCm); sensorWaterLevelLiters = Math.round(sensorWaterLevelInCm * capacityPerCm); + + var dynamicTankHeightInCm = sensorGapCm + sensorWaterLevelInCm; + console.log("dynamicTankHeightInCm",dynamicTankHeightInCm) } } } @@ -8334,7 +8337,7 @@ exports.compareMeasuredHeight = async (req, reply) => { tankName, capacity: tank.capacity, sensor: { - tankHeightInCm: tankHeightInCmFromDB, // from DB + tankHeightInCm: dynamicTankHeightInCm, // from DB sensorGapCm, waterLevelInCm: sensorWaterLevelInCm, waterLevelLiters: sensorWaterLevelLiters