summaryrefslogtreecommitdiffstats
path: root/movement/movement.h
diff options
context:
space:
mode:
authorTheOnePerson <a.nebinger@web.de>2022-10-26 04:57:53 +0200
committerGitHub <noreply@github.com>2022-10-25 21:57:53 -0500
commitcb69a2c181a3126ade2044f223b74077f48e0c77 (patch)
tree0a1d98b5fbebc0ece884e39a1d9f5d7d26dc6c16 /movement/movement.h
parent894d3615e97ebfe22a0da24e0ae5e2d46b9b6e84 (diff)
downloadSensor-Watch-cb69a2c181a3126ade2044f223b74077f48e0c77.tar.gz
Sensor-Watch-cb69a2c181a3126ade2044f223b74077f48e0c77.tar.bz2
Sensor-Watch-cb69a2c181a3126ade2044f223b74077f48e0c77.zip
Add an Alarm face to movement (#96)
* Add movement_play_alarm_beeps() to movement.c and make alarm sounds customizable. Add alarm indicator to simple watch face. * Add alarm face * alarm_face: fix problem with disabling alarms for 00:00. * Fix typos in comments and get rid of of unused variable warning * remove unnecessary constant * simple_clock_face: fix disappearing chime indicator after face switch, enable alarm indicator updates in app loop (for one-time alarms). movement: handle situations where watch is in sleep mode and chimes fire off at the same time as alarms properly. * alarm_face: tweak process of displaying things on the lcd. Add extra long and extra short alarms. Increase number of alarm slots to 16. * alarm face: fix alarms playing one beeping round more than set. * alarm face: add proper quick cycling of hour and minute setting * alarm-face: correct am/pm indication and some minor tweaks. Reset movement_config.h to current main branch. simple-watch-face: Remove unnecessary check and swap indicators (alarm / hourly chime) * alarm-face: reverse commit parts from another branch (accidentially commited logic depending on movement firmware auto firing the long press event) Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
Diffstat (limited to 'movement/movement.h')
-rw-r--r--movement/movement.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/movement/movement.h b/movement/movement.h
index 79222e8c..69b2798a 100644
--- a/movement/movement.h
+++ b/movement/movement.h
@@ -61,7 +61,8 @@ typedef union {
// altimeter to display feet or meters as easily as it tells a thermometer to display degrees in F or C.
bool clock_mode_24h : 1; // indicates whether clock should use 12 or 24 hour mode.
bool use_imperial_units : 1; // indicates whether to use metric units (the default) or imperial.
- uint8_t reserved : 7; // room for more preferences if needed.
+ bool alarm_enabled : 1; // indicates wheter there is at least one alarm enabled.
+ uint8_t reserved : 6; // room for more preferences if needed.
} bit;
uint32_t reg;
} movement_settings_t;
@@ -252,6 +253,7 @@ typedef struct {
// alarm stuff
int16_t alarm_ticks;
bool is_buzzing;
+ BuzzerNote alarm_note;
// button tracking for long press
uint8_t light_down_timestamp;
@@ -300,6 +302,7 @@ void movement_request_wake(void);
void movement_play_signal(void);
void movement_play_alarm(void);
+void movement_play_alarm_beeps(uint8_t rounds, BuzzerNote alarm_note);
uint8_t movement_claim_backup_register(void);