forked from FOSS/BangleApps
Allow setting empty circles
parent
3606267aec
commit
3e6fb2755c
|
@ -7,3 +7,4 @@
|
|||
Make circles and text slightly bigger
|
||||
0.05: Show correct percentage values in circles
|
||||
Show humidity as weather circle data
|
||||
0.06: Allow settings empty circles
|
||||
|
|
|
@ -127,6 +127,9 @@ function drawCircle(index) {
|
|||
case "weather":
|
||||
drawWeather(w);
|
||||
break;
|
||||
case "empty":
|
||||
// we do nothing here
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,7 +224,7 @@ function drawHeartRate(w) {
|
|||
g.setColor(colorGrey);
|
||||
g.fillCircle(w, h3, radiusOuter);
|
||||
|
||||
if (hrtValue != undefined && hrtValue > 0) {
|
||||
if (hrtValue != undefined) {
|
||||
const minHR = settings.minHR || 40;
|
||||
const percent = (hrtValue - minHR) / (settings.maxHR - minHR);
|
||||
drawGauge(w, h3, percent, colorRed);
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
settings[key] = value;
|
||||
storage.write(SETTINGS_FILE, settings);
|
||||
}
|
||||
var valuesCircleTypes = ["steps", "stepsDist", "hr", "battery", "weather"];
|
||||
var namesCircleTypes = ["steps", "distance", "heart", "battery", "weather"];
|
||||
|
||||
var valuesCircleTypes = ["steps", "stepsDist", "hr", "battery", "weather", "empty"];
|
||||
var namesCircleTypes = ["steps", "distance", "heart", "battery", "weather", "empty"];
|
||||
E.showMenu({
|
||||
'': { 'title': 'circlesclock' },
|
||||
'< Back': back,
|
||||
|
@ -78,19 +79,19 @@
|
|||
},
|
||||
'left': {
|
||||
value: settings.circle1 ? valuesCircleTypes.indexOf(settings.circle1) : 0,
|
||||
min: 0, max: 4,
|
||||
min: 0, max: 5,
|
||||
format: v => namesCircleTypes[v],
|
||||
onchange: x => save('circle1', valuesCircleTypes[x]),
|
||||
},
|
||||
'middle': {
|
||||
value: settings.circle2 ? valuesCircleTypes.indexOf(settings.circle2) : 2,
|
||||
min: 0, max: 4,
|
||||
min: 0, max: 5,
|
||||
format: v => namesCircleTypes[v],
|
||||
onchange: x => save('circle2', valuesCircleTypes[x]),
|
||||
},
|
||||
'right': {
|
||||
value: settings.circle3 ? valuesCircleTypes.indexOf(settings.circle3) : 3,
|
||||
min: 0, max: 4,
|
||||
min: 0, max: 5,
|
||||
format: v => namesCircleTypes[v],
|
||||
onchange: x => save('circle3', valuesCircleTypes[x]),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue