mirror of https://github.com/espruino/BangleApps
parent
368a8802e1
commit
42069a6e4e
|
@ -13,7 +13,7 @@
|
|||
E.showMenu({
|
||||
"" : { "title" : "GPS auto time" },
|
||||
"< Back" : () => back(),
|
||||
'Show Widgets': {
|
||||
'Show Widget': {
|
||||
value: !!settings.show,
|
||||
onchange: v => {
|
||||
settings.show = v;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
delete settings;
|
||||
|
||||
Bangle.on('GPS',function(fix) {
|
||||
if (fix.fix) {
|
||||
if (fix.fix && fix.time) {
|
||||
var curTime = fix.time.getTime()/1000;
|
||||
setTime(curTime);
|
||||
lastTimeSet = curTime;
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
0.09: Vibrate with configured pattern
|
||||
Add setting to defer start of algorithm
|
||||
Add setting to disable scheduler alarm
|
||||
|
||||
0.10: Fix: Do not wake when falling asleep
|
||||
|
|
|
@ -9,6 +9,8 @@ The display shows:
|
|||
- Time difference between current time and alarm time (ETA).
|
||||
- Current state of the ESS algorithm, "Sleep" or "Awake", useful for debugging. State can also be "Deferred", see the "Run before alarm"-option.
|
||||
|
||||
Replacing the watch strap with a more comfortable one (e.g. made of nylon) is recommended.
|
||||
|
||||
## Settings
|
||||
|
||||
* **Keep alarm enabled**
|
||||
|
@ -16,7 +18,7 @@ The display shows:
|
|||
- No: No action at configured alarm time from scheduler.
|
||||
* **Run before alarm**
|
||||
- disabled: (default) The ESS algorithm starts immediately when the application starts.
|
||||
- 1..23: The ESS algorithm starts the configured time before the alarm. E.g. when set to 1h for an alarm at 7:00 the ESS algorithm will start at 6:00. This improves battery life.
|
||||
- 1..23: The ESS algorithm starts the configured time before the alarm. E.g. when set to 1h for an alarm at 7:00 the ESS algorithm will start at 6:00. This increases battery life.
|
||||
|
||||
## Logging
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ if (nextAlarmDate !== undefined) {
|
|||
// The alarm widget should handle this one
|
||||
addLog(now, "alarm");
|
||||
setTimeout(load, 1000);
|
||||
} else if (measure && now >= minAlarm && swest_last === false) {
|
||||
} else if (measure && now >= minAlarm && swest === false) {
|
||||
addLog(now, "alarm");
|
||||
buzz();
|
||||
measure = false;
|
||||
|
|
|
@ -30,7 +30,7 @@ function getData() {
|
|||
// remove window
|
||||
Util.hideModal();
|
||||
|
||||
logs = logs.filter(log => log != null);
|
||||
logs = logs.filter(log => log != null && log.filter(entry => entry.type === "alarm").length > 0);
|
||||
logs.sort(function(a, b) {return new Date(b?.filter(entry => entry.type === "alarm")[0]?.time) - new Date(a?.filter(entry => entry.type === "alarm")[0]?.time)}); // sort by alarm date desc
|
||||
logs.forEach((log, i) => {
|
||||
const timeStr = log.filter(entry => entry.type === "alarm")[0]?.time;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "sleepphasealarm",
|
||||
"name": "SleepPhaseAlarm",
|
||||
"shortName": "SleepPhaseAlarm",
|
||||
"version": "0.09",
|
||||
"version": "0.10",
|
||||
"description": "Uses the accelerometer to estimate sleep and wake states with the principle of Estimation of Stationary Sleep-segments (ESS, see https://ubicomp.eti.uni-siegen.de/home/datasets/ichi14/index.html.en). This app will read the next alarm from the alarm application and will wake you up to 30 minutes early at the best guessed time when you are almost already awake.",
|
||||
"icon": "app.png",
|
||||
"tags": "alarm",
|
||||
|
|
Loading…
Reference in New Issue