daisy: use `power_usage` module

pull/3498/head
Rob Pilling 2024-07-09 08:46:07 +01:00
parent b4b4341728
commit 1621ad6e07
3 changed files with 3 additions and 2 deletions

View File

@ -11,3 +11,4 @@
0.11: Minor code improvements
0.12: Added setting to change Battery estimate to hours
0.13: Fixed Battery estimate Default to percentage and improved setting string
0.14: Use `power_usage` module

View File

@ -116,7 +116,7 @@ function updateSunRiseSunSet(now, lat, lon, line){
function batteryString(){
let stringToInsert;
if (settings.batt_hours) {
var batt_usage = 200000/E.getPowerUsage().total;
var batt_usage = require("power_usage").get().hrsLeft;
let rounded;
if (batt_usage > 24) {
var days = Math.floor(batt_usage/24);

View File

@ -1,6 +1,6 @@
{ "id": "daisy",
"name": "Daisy",
"version": "0.13",
"version": "0.14",
"dependencies": {"mylocation":"app"},
"description": "A beautiful digital clock with large ring guage, idle timer and a cyclic information line that includes, day, date, steps, battery, sunrise and sunset times",
"icon": "app.png",