remove more unused variables and functions from previous versions
parent
b71480ef89
commit
3e24a5c599
|
|
@ -3,7 +3,6 @@ var Layout = require("Layout");
|
||||||
require("Font7x11Numeric7Seg").add(Graphics);
|
require("Font7x11Numeric7Seg").add(Graphics);
|
||||||
require("FontTeletext5x9Ascii").add(Graphics);
|
require("FontTeletext5x9Ascii").add(Graphics);
|
||||||
|
|
||||||
const borders = 1;
|
|
||||||
const Light_on='#fff';
|
const Light_on='#fff';
|
||||||
const Light_off='#554';
|
const Light_off='#554';
|
||||||
const Light_warn='#f90';
|
const Light_warn='#f90';
|
||||||
|
|
@ -68,7 +67,7 @@ function getWeather() {
|
||||||
function getdatetime(){
|
function getdatetime(){
|
||||||
var datetime = [];
|
var datetime = [];
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
var offsets = require("Storage").readJSON("worldclock.settings.json") || [];
|
// var offsets = require("Storage").readJSON("worldclock.settings.json") || [];
|
||||||
// var meridian = require("locale").meridian(d);
|
// var meridian = require("locale").meridian(d);
|
||||||
datetime.clock = require("locale").time(d, 1);
|
datetime.clock = require("locale").time(d, 1);
|
||||||
datetime.month = d.getMonth()+1;
|
datetime.month = d.getMonth()+1;
|
||||||
|
|
@ -104,12 +103,6 @@ function isMessagesNotify(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTemperature(){
|
|
||||||
var temperature = E.getTemperature();
|
|
||||||
temperature = typeof temperature !== 'undefined' ? temperature:99999;
|
|
||||||
return Math.round(temperature);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getHRM(){
|
function getHRM(){
|
||||||
let hrm=Bangle.getHealthStatus('last');
|
let hrm=Bangle.getHealthStatus('last');
|
||||||
hrm = typeof hrm !== 'undefined' ? hrm:0;
|
hrm = typeof hrm !== 'undefined' ? hrm:0;
|
||||||
|
|
@ -177,15 +170,11 @@ function setDATA(id,label) {
|
||||||
|
|
||||||
function setWORD(id,label){
|
function setWORD(id,label){
|
||||||
layout.clear(layout[id]);
|
layout.clear(layout[id]);
|
||||||
try {
|
let data='--';
|
||||||
let data='--';
|
if (!isNaN(label)) {
|
||||||
if (!isNaN(label)) {
|
let data=String(String(label).toString(16)).toUpperCase().padStart(2,'0').substring(0,2);
|
||||||
data=String(String(label).toString(16)).toUpperCase().padStart(2,'0').substring(0,2);
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
let data='--';
|
|
||||||
}
|
}
|
||||||
// print(id, data); //debug
|
// print(id, data); //debug
|
||||||
layout[id].label=data;
|
layout[id].label=data;
|
||||||
layout.render(layout[id]);
|
layout.render(layout[id]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue