Implements an advanced pulsometer that can be calibrated by the user.
Also features a streamlined and responsive user interface,
new documentation and generally improved code.
Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/371
Completely refactors the simple clock face
and lays the foundations for new features.
Also adds a compile time 24 hour mode only feature.
Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/373
Makes a long press of the ALARM button reset the face to current day.
Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-by: Wesley Aptekar-Cassels <me@wesleyac.com>
Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/316
Adds overridable C preprocessor definitions for every user preference.
Enables the user to set defaults and omit the preferences face.
The default behavior of the watch is preserved.
Suggested-by: Wesley Aptekar-Cassels <me@wesleyac.com>
Implemented-by: madhogs <x3dh4vhf@duck.com>
Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/295
GitHub-Related-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/291
Avoid resetting it to zero when the face is activated.
Initialize the variables once when the face is first set up.
This makes it remember the last measurement taken by the user.
It will no longer be overwritten when the watch face activates.
Avoid resetting it to default when the face is activated.
Set the default pulsometer calibration once,
only when the face is first set up.
This makes it remember the calibration set by the user.
It will no longer overwrite it.
The clock watch face can now be configured at build time
to only display the time in 24h mode. Also enabled in forced 24h mode.
This should result in smaller code size due to dead code elimination.
Update the copyrights to include full name attribution to all
who contributed to the clock watch face, including myself.
Also add an SPDX license identifier header comment to the files.
Simplifies the code by defining dedicated functions
and separating the case from the main ones.
Also use the snprintf function since the buffer size is known.
Simplifies the code and makes it use the correct indicator.
For some reason it had been switched with the alarm indicator.
WATCH_INDICATOR_BELL
The small bell indicating that an alarm is set.
WATCH_INDICATOR_SIGNAL
The hourly signal indicator.
Also useful for indicating that sensors are on.
Deduplicates state in the clock state and movement settings.
Makes the code simpler.
Also makes it use the correct indicator.
For some reason it had been switched
with the hourly chime indicator.
WATCH_INDICATOR_BELL
The small bell indicating that an alarm is set.
WATCH_INDICATOR_SIGNAL
The hourly signal indicator.
Also useful for indicating that sensors are on.
Instances of the clock state structure
are only passed to the clock face itself
and only via the opaque context pointer.
No other code uses it.
Thus there is no need to expose it in a header file.
So make it an implementation detail of the watch face
by localizing it inside the translation unit.
Instances of the pulsometer state structure are only passed
to the pulsometer itself and only via the opaque context pointer.
No other code uses it. There is no need to expose it in a header file
so make it an implementation detail of the watch face.
Update the copyrights to include full name attribution to all
who contributed to the pulsometer watch face, including myself.
Also add an SPDX license identifier header comment to the files.
Implements an advanced pulsometer that can be recalibrated by the user.
The main clock face now displays the measured pulses per minute.
The day of month digits now display the pulsometer calibration.
The light button now cycles through integer graduations
which now range from 1 to 39 pulses per minute.
Long presses of the light button cycle by 10 instead of 1.
The watch face's responsiveness to input has been carefully optimized.
The code has been reorganized and generally improved.
I like to use the ten minute timeout on my watch and there are other
people who have similar interests in a lower deadline. The two day
deadline had to go to still accommodate the change within the three
bit index.
The default setting is still the one hour timeout.