@@ -69,12 +69,10 @@ function findBtDevices() {
6969 } , { timeout : 3000 , active : true } ) ;
7070}
7171
72- function taskButtonInterpretter ( arg , string ) {
72+ function taskButtonInterpretter ( string ) {
7373 //turn off FindDeviceHandler whenever we navigate off task screen
7474 let command = 'if (NRFFindDeviceTimeout){clearTimeout(NRFFindDeviceTimeout);}' + string ;
75- let func = new Function ( arg , command ) ;
7675 return eval ( command ) ;
77- //func();
7876}
7977
8078function queueTaskScreenTimeout ( ) {
@@ -132,7 +130,7 @@ function draw() {
132130 btn . src = eval ( task . icon ) ;
133131 //callback on button press
134132 if ( task . cbBtn ) {
135- btn . cb = l => taskButtonInterpretter ( "true" , task . cbBtn ) ;
133+ btn . cb = l => taskButtonInterpretter ( task . cbBtn ) ;
136134 }
137135 //back color determination
138136 btn . btnFaceCol = "#90EE90" ;
@@ -145,7 +143,7 @@ function draw() {
145143 if ( settings [ "bt_" + task . id + "_id" ] === undefined || ! settings [ "bt_" + task . id + "_id" ] ) {
146144 //make it clickable so we can go to settings and pair something
147145 btn . btnFaceCol = "#FF0000" ;
148- btn . cb = l => taskButtonInterpretter ( 'true' , "Bangle.load('heatsuite.settings.js');" ) ;
146+ btn . cb = l => taskButtonInterpretter ( "Bangle.load('heatsuite.settings.js');" ) ;
149147 }
150148 }
151149 //builder for each icon in taskScreen
0 commit comments