widhid: delete unused variables

master
Rob Pilling 2023-05-10 08:05:29 +01:00
parent 6cca01db0b
commit abc57030ad
2 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@
console.log("widhid: can't enable, HID setting isn't \"kbmedia\""); console.log("widhid: can't enable, HID setting isn't \"kbmedia\"");
return; return;
} }
delete settings;
var anchor = { x: 0, y: 0 }; var anchor = { x: 0, y: 0 };
var start = { x: 0, y: 0 }; var start = { x: 0, y: 0 };
var dragging = false; var dragging = false;
@ -111,6 +112,7 @@
}; };
if (connected) if (connected)
Bangle.on("swipe", onSwipe); Bangle.on("swipe", onSwipe);
delete connected;
NRF.on("connect", function () { NRF.on("connect", function () {
WIDGETS["hid"].width = 24; WIDGETS["hid"].width = 24;
Bangle.on("swipe", onSwipe); Bangle.on("swipe", onSwipe);

View File

@ -4,6 +4,8 @@
console.log("widhid: can't enable, HID setting isn't \"kbmedia\""); console.log("widhid: can't enable, HID setting isn't \"kbmedia\"");
return; return;
} }
// @ts-ignore
delete settings;
let anchor = {x:0,y:0}; let anchor = {x:0,y:0};
let start = {x:0,y:0}; let start = {x:0,y:0};
@ -117,6 +119,8 @@
if(connected) if(connected)
Bangle.on("swipe", onSwipe); Bangle.on("swipe", onSwipe);
// @ts-ignore
delete connected;
NRF.on("connect", () => { NRF.on("connect", () => {
WIDGETS["hid"]!.width = 24; WIDGETS["hid"]!.width = 24;