Simplest: fixed for bangle 2

pull/851/head
hughbarney 2021-10-19 20:56:49 +01:00
parent 97688cc381
commit 22b6bc5dee
2 changed files with 7 additions and 3 deletions

View File

@ -1,2 +1,3 @@
0.01: Modified for use with new bootloader and firmware
0.02: Use Bangle.setUI for button/launcher handling
0.03: Fix display for Bangle 2

View File

@ -1,14 +1,17 @@
const h = g.getHeight();
const w = g.getWidth();
function draw() {
var d = new Date();
var da = d.toString().split(" ");
var time = da[4].substr(0,5);
g.reset();
g.clearRect(0, 30, 239, 99);
g.clearRect(0, 30, w, 99);
g.setFontAlign(0, -1);
g.setFont("Vector", 80);
g.drawString(time, 120, 40);
g.setFont("Vector", w/3);
g.drawString(time, w/2, 40);
}
// handle switch display on by pressing BTN1