faces/pulsometer: implement advanced pulsometer

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.
This commit is contained in:
Matheus Afonso Martins Moreira
2024-02-21 06:00:18 -03:00
parent af18673e1a
commit ea47bf9f22
2 changed files with 125 additions and 45 deletions

View File

@@ -56,8 +56,9 @@
typedef struct {
bool measuring;
int16_t pulse;
int16_t pulses;
int16_t ticks;
int8_t calibration;
} pulsometer_state_t;
void pulsometer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);