diff --git a/apps/circlesclock/ChangeLog b/apps/circlesclock/ChangeLog index 5464a8103..d22ef7737 100644 --- a/apps/circlesclock/ChangeLog +++ b/apps/circlesclock/ChangeLog @@ -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 diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js index 88a04d4b9..581e167d1 100644 --- a/apps/circlesclock/app.js +++ b/apps/circlesclock/app.js @@ -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); diff --git a/apps/circlesclock/settings.js b/apps/circlesclock/settings.js index ac4215a8a..8dab5fccf 100644 --- a/apps/circlesclock/settings.js +++ b/apps/circlesclock/settings.js @@ -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]), }