Skip to content

Commit 3e24a5c

Browse files
committed
remove more unused variables and functions from previous versions
1 parent b71480e commit 3e24a5c

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

apps/dsky_clock/app.js

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ var Layout = require("Layout");
33
require("Font7x11Numeric7Seg").add(Graphics);
44
require("FontTeletext5x9Ascii").add(Graphics);
55

6-
const borders = 1;
76
const Light_on='#fff';
87
const Light_off='#554';
98
const Light_warn='#f90';
@@ -68,7 +67,7 @@ function getWeather() {
6867
function getdatetime(){
6968
var datetime = [];
7069
var d = new Date();
71-
var offsets = require("Storage").readJSON("worldclock.settings.json") || [];
70+
// var offsets = require("Storage").readJSON("worldclock.settings.json") || [];
7271
// var meridian = require("locale").meridian(d);
7372
datetime.clock = require("locale").time(d, 1);
7473
datetime.month = d.getMonth()+1;
@@ -104,12 +103,6 @@ function isMessagesNotify(){
104103
}
105104
}
106105

107-
function getTemperature(){
108-
var temperature = E.getTemperature();
109-
temperature = typeof temperature !== 'undefined' ? temperature:99999;
110-
return Math.round(temperature);
111-
}
112-
113106
function getHRM(){
114107
let hrm=Bangle.getHealthStatus('last');
115108
hrm = typeof hrm !== 'undefined' ? hrm:0;
@@ -177,15 +170,11 @@ function setDATA(id,label) {
177170

178171
function setWORD(id,label){
179172
layout.clear(layout[id]);
180-
try {
181-
let data='--';
182-
if (!isNaN(label)) {
183-
data=String(String(label).toString(16)).toUpperCase().padStart(2,'0').substring(0,2);
184-
}
185-
} catch(e) {
186-
let data='--';
173+
let data='--';
174+
if (!isNaN(label)) {
175+
let data=String(String(label).toString(16)).toUpperCase().padStart(2,'0').substring(0,2);
187176
}
188-
// print(id, data); //debug
177+
// print(id, data); //debug
189178
layout[id].label=data;
190179
layout.render(layout[id]);
191180
}

0 commit comments

Comments
 (0)