Add screenshot, change colours for theme.

master
Ivor Hewitt 2021-12-29 16:20:29 +00:00
parent 19126205b9
commit 1f7881e1c2
3 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@
// If enabled in settings run constantly in background
//
(function() {
var log = function() {};//print
var settings = {};
var device;
var gatt;
@ -63,11 +63,11 @@ function getSensorBatteryLevel(gatt) {
}
function connection_setup() {
console.log("Scanning for CoreTemp sensor...");
log("Scanning for CoreTemp sensor...");
NRF.requestDevice({timeout : 20000, filters : [ {namePrefix : 'CORE'} ]})
.then(function(d) {
device = d;
console.log("Found device");
log("Found device");
return device.gatt.connect();
})
.then(function(g) {
@ -86,13 +86,13 @@ function connection_setup() {
return characteristic.startNotifications();
})
.then(function() {
console.log("Done!");
log("Done!");
// getSensorBatteryLevel(gatt);
// g.reset().clearRect(Bangle.appRect).flip();
})
.catch(function(e) {
console.log(e.toString(), "ERROR");
console.log(e);
log(e.toString(), "ERROR");
log(e);
});
}
@ -102,8 +102,8 @@ function connection_end() {
}
settings = require("Storage").readJSON("coretemp.json", 1) || {};
console.log("Settings:");
console.log(settings);
log("Settings:");
log(settings);
if (settings.enabled) {
connection_setup();

View File

@ -21,7 +21,7 @@ var corelogo = {
function onCore(c) {
g.setFontAlign(0, 0);
g.clearRect(0, 32 + 48, g.getWidth(), 32 + 48 + 24 * 3);
g.setColor(0xC618); // Light gray
g.setColor(g.theme.dark ? "#CCC" : "#333"); // gray
g.setFont("6x8", 3).drawString("Core: " + ((c.core<327)?(c.core + c.unit):'n/a'), px, 48 + 48);
g.setFont("6x8", 3).drawString("Skin: " + c.skin + c.unit, px, 48 + 48 + 24);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB