mirror of https://github.com/espruino/BangleApps
Merge branch 'master' of github.com:espruino/BangleApps
commit
a3c82d5bab
|
@ -1,2 +1,3 @@
|
|||
0.01: Initial version
|
||||
0.02: setTimeout bug fix; no leading zero on date; lightmode; 12 hour format; cleanup
|
||||
0.03: Internationalisation; bug fix - battery icon responds promptly to charging state
|
||||
|
|
|
@ -29,6 +29,7 @@ function draw() {
|
|||
const level = E.getBattery();
|
||||
const width = level + (level/2);
|
||||
var is12Hour = (require("Storage").readJSON("setting.json", 1) || {})["12hour"];
|
||||
var dows = require("date_utils").dows(0,1);
|
||||
|
||||
g.reset();
|
||||
g.clear();
|
||||
|
@ -46,7 +47,7 @@ function draw() {
|
|||
g.drawString(d, g.getWidth() -6, 98);
|
||||
g.setFont('Vector', 52);
|
||||
g.setFontAlign(-1, -1);
|
||||
g.drawString("SUMOTUWETHFRSA".slice(2*w,2*w+2), 6, 103);
|
||||
g.drawString(dows[w].slice(0,2).toUpperCase(), 6, 103);
|
||||
|
||||
g.fillRect(9,159,166,171);
|
||||
g.fillRect(167,163,170,167);
|
||||
|
@ -71,7 +72,6 @@ function draw() {
|
|||
queueDraw();
|
||||
}
|
||||
|
||||
//the following section is also from waveclk
|
||||
Bangle.on('lcdPower', on => {
|
||||
if (on) {
|
||||
draw(); // draw immediately, queue redraw
|
||||
|
@ -81,6 +81,10 @@ Bangle.on('lcdPower', on => {
|
|||
}
|
||||
});
|
||||
|
||||
Bangle.on('charging', (charging) => {
|
||||
draw();
|
||||
});
|
||||
|
||||
Bangle.loadWidgets();
|
||||
draw();
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "bigdclock",
|
||||
"name": "Big digit clock containing just the essentials",
|
||||
"shortName":"Big digit clk",
|
||||
"version":"0.02",
|
||||
"version":"0.03",
|
||||
"description": "A clock containing just the essentials, made as easy to read as possible for those of us that need glasses. It contains the time, the day-of-week, the day-of-month, and the current battery state-of-charge.",
|
||||
"icon": "bigdclock.png",
|
||||
"type": "clock",
|
||||
|
|
Loading…
Reference in New Issue