mirror of https://github.com/espruino/BangleApps
daisy: use `power_usage` module
parent
b4b4341728
commit
1621ad6e07
|
@ -11,3 +11,4 @@
|
||||||
0.11: Minor code improvements
|
0.11: Minor code improvements
|
||||||
0.12: Added setting to change Battery estimate to hours
|
0.12: Added setting to change Battery estimate to hours
|
||||||
0.13: Fixed Battery estimate Default to percentage and improved setting string
|
0.13: Fixed Battery estimate Default to percentage and improved setting string
|
||||||
|
0.14: Use `power_usage` module
|
||||||
|
|
|
@ -116,7 +116,7 @@ function updateSunRiseSunSet(now, lat, lon, line){
|
||||||
function batteryString(){
|
function batteryString(){
|
||||||
let stringToInsert;
|
let stringToInsert;
|
||||||
if (settings.batt_hours) {
|
if (settings.batt_hours) {
|
||||||
var batt_usage = 200000/E.getPowerUsage().total;
|
var batt_usage = require("power_usage").get().hrsLeft;
|
||||||
let rounded;
|
let rounded;
|
||||||
if (batt_usage > 24) {
|
if (batt_usage > 24) {
|
||||||
var days = Math.floor(batt_usage/24);
|
var days = Math.floor(batt_usage/24);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ "id": "daisy",
|
{ "id": "daisy",
|
||||||
"name": "Daisy",
|
"name": "Daisy",
|
||||||
"version": "0.13",
|
"version": "0.14",
|
||||||
"dependencies": {"mylocation":"app"},
|
"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",
|
"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",
|
"icon": "app.png",
|
||||||
|
|
Loading…
Reference in New Issue