Skip to content

Commit 2901c34

Browse files
authored
Fix lint error, return more values in get()
1 parent d28d762 commit 2901c34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/smartbatt/module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@
6262
} else {
6363
let weightCoefficient = 1;
6464
let currentDrainage = battChange / deltaHours;
65-
let drainageChange = data.avgBattDrainage - currentDrainage;
66-
67-
6865
let newAvg = weightedAverage(data.avgBattDrainage, data.totalHours, currentDrainage, deltaHours * weightCoefficient);
6966
data.avgBattDrainage = newAvg;
7067
data.timeLastRecorded = now;
@@ -115,6 +112,9 @@
115112
return {
116113
batt: batt,
117114
hrsLeft: hrsLeft,
115+
avgDrainage:data.avgDrainage,
116+
totalHours:data.totalHours,
117+
cycles:data.cycles
118118
};
119119
}
120120

0 commit comments

Comments
 (0)