2021-12-19 17:09:43 +00:00
|
|
|
// Simply listen for core events and show data
|
2021-12-15 22:11:18 +00:00
|
|
|
|
2021-12-13 16:00:56 +00:00
|
|
|
Bangle.setLCDPower(1);
|
|
|
|
Bangle.setLCDTimeout(0);
|
2021-12-28 18:25:43 +00:00
|
|
|
|
2021-12-15 22:11:18 +00:00
|
|
|
var btm = g.getHeight() - 1;
|
2021-12-28 18:25:43 +00:00
|
|
|
var img = {
|
|
|
|
width : 146,
|
|
|
|
height : 48,
|
|
|
|
bpp : 4,
|
|
|
|
transparent : 0,
|
|
|
|
palette : new Uint16Array([ 65535, 65535, 2854, 1419 ]),
|
|
|
|
buffer :
|
|
|
|
require("heatshrink")
|
|
|
|
.decompress(atob(
|
|
|
|
"AEUDmczmBD/I4xJ/AAMCkBHFAAJG8kQABJAJHFSVURAAUQRphHCkQGBJAySngJHDJRhHEJALZDAgiSBEQ0RPBIAKHAwQQI4xIEaoQFEEZpIULSRHFkDZDBwZIMEYhITa44SKSAxIDSARIDJ4IjKJCpHNEoiQGJDA2CJCQSOCYaQGJDBsCGiKQGTZIJCI4xBEJBAAEFpQAPDQoMGBQyOGIJJPGF6AALC5glCbJAQEgZCEAoowTSBypJBwKQMIQaSBAgZIJWw5ITB5RTDSBLbEAAjDOPRIVabIiQFJBCQKPYhIVCRxIEBg7WDSBpIVbJ5IQJIqQBgZIiCh7ZLJIriDbhJI3JoxIebIZITI6BIjCZ5IRI4RIPHAYAJJH4AIUAJIzHIhI/SAwzBJH6QGJH5HIHApI2HCIAJL4pITkATOJQJIMHCJeFJD8zaZCQHJCEBJCUCJCKPBJBhWGJEcia5oACJBSfHJB4QMJA6SLI4ZIKPAg3QJCUAJCbbBJETbPJAbbKbIhIBYJpIQbZ5UDbZzZFPBxIVSRIOBJA5JISAhIIF4ZIUfQpJHEwQKDJAhJHbJbBJJCIZECY4KGSQoABBIZOBSBbbIJC6IEBQqSJJoyQLbZBIRbYoAKJAaSHJAjbCF541RSRISLSRkgJAKQKbY5ISJJyQDSRyQMbYxITChhHFSRhGMbY5IUCpRHHJJZITiBIVbpBHJbpJHPFhBITfI4ANIwcgI6AAV"))
|
|
|
|
}
|
2021-12-13 16:00:56 +00:00
|
|
|
|
2021-12-28 18:25:43 +00:00
|
|
|
function onCore(c) {
|
|
|
|
var core = "Core: " + c.core + "°" + c.unit;
|
|
|
|
var skin = "Skin: " + c.skin + "°" + c.unit;
|
2021-12-15 22:11:18 +00:00
|
|
|
|
2021-12-28 18:25:43 +00:00
|
|
|
var px = g.getWidth() / 2;
|
|
|
|
g.setFontAlign(0, 0);
|
|
|
|
g.clearRect(0, 24, g.getWidth(), g.getHeight() - 24);
|
|
|
|
g.drawImage(img, 0, 30);
|
|
|
|
g.setColor(0xC618); // Light gray
|
|
|
|
g.setFont("6x8", 3).drawString(core, px, 48 + 48);
|
|
|
|
g.setFont("6x8", 3).drawString(skin, px, 48 + 48 + 24);
|
|
|
|
} Bangle.on('CoreTemp', onCore);
|
2021-12-13 16:00:56 +00:00
|
|
|
|
|
|
|
g.clear();
|
|
|
|
Bangle.loadWidgets();
|
|
|
|
Bangle.drawWidgets();
|
|
|
|
|
2021-12-15 22:11:18 +00:00
|
|
|
g.reset().setFont("6x8", 2).setFontAlign(0, 0);
|
|
|
|
g.drawString("Please wait...", g.getWidth() / 2, g.getHeight() / 2 - 16);
|