From 2901c34a2301977846b1945ec762fc326ee010ce Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Fri, 1 Aug 2025 22:17:42 -0400 Subject: [PATCH] Fix lint error, return more values in get() --- apps/smartbatt/module.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/smartbatt/module.js b/apps/smartbatt/module.js index ec6ef9eee..5321f4b7b 100644 --- a/apps/smartbatt/module.js +++ b/apps/smartbatt/module.js @@ -62,9 +62,6 @@ } else { let weightCoefficient = 1; let currentDrainage = battChange / deltaHours; - let drainageChange = data.avgBattDrainage - currentDrainage; - - let newAvg = weightedAverage(data.avgBattDrainage, data.totalHours, currentDrainage, deltaHours * weightCoefficient); data.avgBattDrainage = newAvg; data.timeLastRecorded = now; @@ -115,6 +112,9 @@ return { batt: batt, hrsLeft: hrsLeft, + avgDrainage:data.avgDrainage, + totalHours:data.totalHours, + cycles:data.cycles }; }