forked from FOSS/BangleApps
[ minor, codestyle ] Fix inconsistent indentation
parent
1ec19d47b1
commit
dabb6dc72c
|
@ -26,8 +26,7 @@ const zahlpos=(function() {
|
||||||
return z;
|
return z;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
let zeiger = function(len,dia,tim) {
|
||||||
let zeiger = function(len,dia,tim){
|
|
||||||
const x=c.x+ Math.cos(tim)*len/2,
|
const x=c.x+ Math.cos(tim)*len/2,
|
||||||
y=c.y + Math.sin(tim)*len/2,
|
y=c.y + Math.sin(tim)*len/2,
|
||||||
d={"d":3,"x":dia/2*Math.cos(tim+Math.PI/2),"y":dia/2*Math.sin(tim+Math.PI/2)},
|
d={"d":3,"x":dia/2*Math.cos(tim+Math.PI/2),"y":dia/2*Math.sin(tim+Math.PI/2)},
|
||||||
|
@ -96,7 +95,7 @@ let queueDraw = function() {
|
||||||
}, queueMillis - (Date.now() % queueMillis));
|
}, queueMillis - (Date.now() % queueMillis));
|
||||||
};
|
};
|
||||||
|
|
||||||
let draw = function(){
|
let draw = function() {
|
||||||
// draw black rectangle in the middle to clear screen from scale and hands
|
// draw black rectangle in the middle to clear screen from scale and hands
|
||||||
g.setColor(0,0,0);
|
g.setColor(0,0,0);
|
||||||
g.fillRect(10,10,2*c.x-10,2*c.x-10);
|
g.fillRect(10,10,2*c.x-10,2*c.x-10);
|
||||||
|
@ -114,7 +113,7 @@ let draw = function(){
|
||||||
};
|
};
|
||||||
|
|
||||||
//draws the scale once the app is startet
|
//draws the scale once the app is startet
|
||||||
let drawScale = function(){
|
let drawScale = function() {
|
||||||
// clear the screen
|
// clear the screen
|
||||||
g.setBgColor(0,0,0);
|
g.setBgColor(0,0,0);
|
||||||
g.clear();
|
g.clear();
|
||||||
|
@ -141,7 +140,8 @@ Bangle.setUI({
|
||||||
Bangle.removeListener('lcdPower', updateState);
|
Bangle.removeListener('lcdPower', updateState);
|
||||||
Bangle.removeListener('lock', updateState);
|
Bangle.removeListener('lock', updateState);
|
||||||
require("widget_utils").show();
|
require("widget_utils").show();
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
// Load widgets if needed, and make them show swipeable
|
// Load widgets if needed, and make them show swipeable
|
||||||
if (settings.loadWidgets) {
|
if (settings.loadWidgets) {
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
|
@ -166,7 +166,6 @@ let updateState = function() {
|
||||||
|
|
||||||
// Stop updates when LCD is off, restart when on
|
// Stop updates when LCD is off, restart when on
|
||||||
Bangle.on('lcdPower', updateState);
|
Bangle.on('lcdPower', updateState);
|
||||||
|
|
||||||
Bangle.on('lock', updateState);
|
Bangle.on('lock', updateState);
|
||||||
|
|
||||||
let unlock = true;
|
let unlock = true;
|
||||||
|
|
Loading…
Reference in New Issue