mirror of https://github.com/espruino/BangleApps
Minor changes
parent
549ee39069
commit
60242a5008
|
@ -3,8 +3,7 @@
|
||||||
A really happy clock.
|
A really happy clock.
|
||||||
|
|
||||||
The left eye shows the hour, the right hour the minutes.
|
The left eye shows the hour, the right hour the minutes.
|
||||||
The mouth the battery percentage, each eyebrow shows 5k steps.
|
The mouth the battery percentage, each eyebrow the left mouthline shows whether your bangle is locked or not and the right whether you reached 10k steps.
|
||||||
The left mouthline shows whether your bangle is locked or not and the right whether its connected via bluetooth or not.
|
|
||||||
|
|
||||||
## Creator
|
## Creator
|
||||||
- [David Peer](https://github.com/peerdavid).
|
- [David Peer](https://github.com/peerdavid).
|
||||||
|
|
|
@ -59,25 +59,22 @@ let drawSmile = function(isLocked){
|
||||||
var w = 8;
|
var w = 8;
|
||||||
var y = 120;
|
var y = 120;
|
||||||
var o = parseInt(E.getBattery()*0.8);
|
var o = parseInt(E.getBattery()*0.8);
|
||||||
|
|
||||||
var isConnected = NRF.getSecurityStatus().connected;
|
|
||||||
for(var i = 0; i < w; i++){
|
for(var i = 0; i < w; i++){
|
||||||
drawCurve(30, y+i, W/2+10, y+i+o, W-40, y+i);
|
drawCurve(30, y+i, W/2+10, y+i+o, W-40, y+i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var reachedSteps = Bangle.getHealthStatus("day").steps >= 10000;
|
||||||
for(var i=0; i < w-2; i++){
|
for(var i=0; i < w-2; i++){
|
||||||
if(isLocked) g.drawLine(25, y+5+i, 35, y-5+i);
|
if(isLocked) g.drawLine(25, y+5+i, 35, y-5+i);
|
||||||
if(isConnected) g.drawLine(W-35, y+5+i, W-45, y-5+i);
|
if(reachedSteps) g.drawLine(W-35, y+5+i, W-45, y-5+i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let drawEyeBrow = function(){
|
let drawEyeBrow = function(){
|
||||||
var w = 4;
|
var w = 4;
|
||||||
var steps = Bangle.getHealthStatus("day").steps;
|
|
||||||
var reached = steps / 10000.0;
|
|
||||||
for(var i = 0; i < w; i++){
|
for(var i = 0; i < w; i++){
|
||||||
if(reached > 0.5) g.drawLine(25, 25+i, 70, 15+i);
|
g.drawLine(25, 25+i, 70, 15+i);
|
||||||
if(reached > 1.0) g.drawLine(W-25, 25+i, W-70, 15+i);
|
g.drawLine(W-25, 25+i, W-70, 15+i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue