Changes
- Fixed an alarm retriggering bug that was causing weird issues like alarm time changing and motor behaving weirdly.
- Fixed auto-snooze after 2 minutes of ringing.
- Removed currently unused settings on the settings page and added desired cycle count and cycle duration customization options.
PLEASE READ FULLY TO UNDERSTAND CURRENT CAPABILITIES
First Beta Release for Testing
So far, this is a port of some of the wake features of SleepTK and its insomnia insights page. It currently also logs the heartrates to a file called "SleepTracker_Data.csv" which can be extracted from the PineTime for analysis, but the on-watch analysis is coming soon.
Instructions
Read the InfiniTime repo on how to flash your PineTime with this firmware, the binary is based on the MCUBoot. The app is located on the last page of the apps list.
The first page is where you can turn the tracker on right before you sleep, and you should see the text turn red to reduce blue light and begin tracking. If you swipe left from the main page, you can edit the settings for the app. So far, the only ones that affect anything are the gradual wake & heart rate tracking toggles. Swiping right from the main page takes you to the wake alarm page where you can set your alarm and when it repeats. By default, it snoozes 3 minutes after it starts going off for 3 minutes. The on-screen stop button is for snoozing, to fully stop the alarm, you need to press the side button 5 times.
Features
- Gradual Wake
- Heart Rate Monitor/Log
- Insomnia Insights
- Heart Rate
- Alarm Time
- Gradual Wake Steps Remaining
- Sleep Cycles
- Total Sleep
- Suggested Alarm
Clarifications
Total Sleep
This is based on the time you start the tracker and not on the heart rate logs currently, so it may not be fully accurate. I am looking at a way to improve this in the future, but this seems to be the simply way for now.
Sleep Cycles
As with total sleep time, the sleep cycles counter currently does not take into account the sensor data. It is based on the average length of sleep cycles which is 90 minutes for now.
Suggested Alarm Time
The suggested alarm time is based on the defined sleep cycle duration and desired sleep cycles in the InfiniSleepController.h file. Basically, it suggests an alarm at a time when the desired amount of sleep cycles would be complete.
Constants
The constants are currently at the top of the InfiniSleepController.h. You can change them according to your preference. The gradual wake intervals and their respective vibration strength are located in the same file in lines 141 & 142. If you modify these arrays, keep the length to 9.
Feedback
I'd gladly appreciate any feedback and suggestions that can make this app better, feel free to open an issue on this repo to discuss any bugs, ideas, or feature requests.