Skip to content

Commit 149b94b

Browse files
committed
fixed error
1 parent d46a140 commit 149b94b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

apps/heatsuite/heatsuite.app.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

8078
function 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

Comments
 (0)