@@ -3,7 +3,6 @@ var Layout = require("Layout");
33require ( "Font7x11Numeric7Seg" ) . add ( Graphics ) ;
44require ( "FontTeletext5x9Ascii" ) . add ( Graphics ) ;
55
6- const borders = 1 ;
76const Light_on = '#fff' ;
87const Light_off = '#554' ;
98const Light_warn = '#f90' ;
@@ -68,7 +67,7 @@ function getWeather() {
6867function 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-
113106function getHRM ( ) {
114107 let hrm = Bangle . getHealthStatus ( 'last' ) ;
115108 hrm = typeof hrm !== 'undefined' ? hrm :0 ;
@@ -177,15 +170,11 @@ function setDATA(id,label) {
177170
178171function 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