1
0
Fork 0

Update widget.js

Typos
master
KungPhoo 2022-03-23 09:20:59 +01:00 committed by GitHub
parent aa118dc3fa
commit c7242674f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 15 deletions

View File

@ -1,15 +1,23 @@
WIDGETS["bluetooth"]={area:"tr",width:15,draw:function() {
WIDGETS.bluetooth = {
area: "tr",
width: 15,
draw: function() {
g.reset();
if (NRF.getSecurityStatus().connected)
g.setColor((g.getBPP()>8) ? "#07f" : (g.theme.dark ? "#0ff" : "#00f"));
else
if (NRF.getSecurityStatus().connected) {
g.setColor((g.getBPP() > 8) ? "#07f" : (g.theme.dark ? "#0ff" : "#00f"));
} else {
g.setColor(g.theme.dark ? "#666" : "#999");
g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),2+this.x,2+this.y);
},connect:function() {
WIDGETS["bluetooth"].draw();
},dicconnect:function() {
Bangle.buzz(1000,1); // buzz on connection loss
WIDGETS["bluetooth"].draw();
}};
NRF.on('connect',WIDGETS["bluetooth"].connect);
NRF.on('disconnect',WIDGETS["bluetooth"].disconnect);
}
g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="), 2 + this.x, 2 + this.y);
},
connect: function() {
WIDGETS.bluetooth.draw();
},
diconnect: function() {
Bangle.buzz(1000, 1); // buzz on connection loss
WIDGETS.bluetooth.draw();
}
};
NRF.on('connect', WIDGETS.bluetooth.connect);
NRF.on('disconnect', WIDGETS.bluetooth.diconnect);