Updated to work with new API. Additional capability includes:
1. Now also records upto 2 hours - if you cancel at any time the CSV file will still be there, the timer you set at the start is more so that you get an alert when it's complete.
2. Along with raw PPG readings, it also records bandpassed filtered data in a second column, available in the new API.
3. Rather than overwriting 1 data file, the app will record upto 5 files before recording to a generic data file as a fallback if all 5 allocated files remain on the watch storage. The limit is in place to avoid going over storage limits as these files can get large over time.
`undefined` handlers are created when we [remove listeners] part-way
through the array. This fixes `backswipe` for all firmwares, but
leaves the door open for a potential firmware change.
[remove listeners]: 0f16231a43/src/jswrap_object.c (L1035-L1035)
Offset ypos function. Use float in sine function instead of fraction to represent 2*pi. Added function to format time, which makes times draw correct. Moved global variables. Made animations more consistent
Increased sun position resolution. Fixed various wrong offsets. Fixed sun positions for sun rise & set. Fixed sine line not drawing until the right screen edge. Simplified
Fixed bug in function drawClock: displayed time jumps from 11:50 to 12:59 to 12:07
Fixed bug in function drawClock: skipping 23 o'clock
Simplified various parts & removed unreachable checks
Only for Bangle.js 2, because part of the "simple" is that we draw to a
graphics buffer, and B1 doesn't have enough memory for a colour buffer.
(Drawing directly would involve sprinkling y-offsets and
"redraw background" all over the code; doable, but no longer simple)