32 Commits

Author SHA1 Message Date
Matheus Afonso Martins Moreira
4d6a9345f2 Merge PR #299 - leading zero representation
Adds a movement-wide leading zero 024h representation mode
that's toggleable in the preferences watch face.
Also adds support for the new display mode to existing faces.

I modified the logic a bit to ensure the 24h indicator remains lit
in the simple clock face even when in 024h mode. I also added support
to the more advanced clock face. In the future I will add a compile time
toggle to it as well.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/299
2024-09-03 18:49:13 -03:00
David Volovskiy
2afc2c6721 isolating this bit of complexity in movement function; Add ifdefs in clock faces for DCE 2024-07-10 07:22:55 -04:00
Matheus Afonso Martins Moreira
955ac94de3 faces: restore simple_clock_face
Restore the original simple clock face as requested.
2024-03-16 20:04:08 -03:00
Matheus Afonso Martins Moreira
8f040252fd faces: rename simple_clock_face to clock_face
It's not actually so simple and will only gain features from now on.
Just "clock face" also feels more canonical.
2024-02-24 18:53:07 -03:00
Wesley Aptekar-Cassels
e9fe4aeefe Enable custom signal tones in LE mode.
This makes movement_play_signal synchronous when in LE mode, despite
using the underlying asynchronous API. It's a bit of a hack, but it
should work well enough for now.

This also moves the enabling/disabling of the buzzer into the
movement_play_signal function, so that watch faces no longer have to do
it.
2024-01-09 16:22:21 -05:00
Wesley Aptekar-Cassels
6f4917a0d5 Revert "Merge pull request #283 from neutralinsomniac/fix_hourly_chime_background"
This reverts commit 5c94111ea20e50cb9dab8f416603403185e933b3, reversing
changes made to bc9b4ce700d3f12adc0daceaa880e3d638df0c2b.
2024-01-09 16:22:21 -05:00
Jonathan Glines
f633b7634b Support leading zero representation for 24h clock
Toggle between default behavior and leading zero with long-press of alarm
button on page with 24h setting.
2023-10-29 11:15:50 -04:00
joeycastillo
b162dc0663 use movement_play_signal for default tune (fixes background signal) 2023-09-24 12:41:18 -04:00
Jeremy O'Brien
45f402b4ec move buzzer enabled detection logic into movement for movement_play_signal/tune
this way watch faces don't have to disable/enable the buzzer themselves
before calling movement_play_signal() and movement_play_tune()
2023-09-23 10:56:12 -04:00
Jeremy O'Brien
bfde84f01d fix signal tunes not firing in background, and split out foreground/background chime functions 2023-09-22 07:29:04 -04:00
joeycastillo
3142fccea3 Merge branch 'main' into default-handler 2023-01-17 10:52:42 -06:00
joeycastillo
5163cf1fe1 Revert "never disable buzzer output"
This reverts commit 851d047c818dacc30c86f4d87f33247dcfb0095c.
2023-01-17 08:52:01 -06:00
joeycastillo
0ef80b62da add movement_default_loop_handler, test with default watch faces 2023-01-14 14:21:04 -05:00
Mikhail Svarichevsky
6b71711079
Precision watch update (#152)
* Intermediate changes

* Databank working

* Main commit for precision timing

First version where all functions are supposed to be working

* Fix math error in nanosec. File storage for location.

* Remove obsolete comments

* Missing page name on pages rotation - thanks to jeremy

* Delete file.diff

* Cleanup+tempchart

1) finetune must always reset last calibration time when doing non-0 time correction, even when you are not applying ppm correction.
2) Dithers over 31 periods not 10, more resolution with still no risk of overflow
3) Minute-boundery finetune fix. I also just got this 1-minute error after finetune...
4) Write frequency calibration value in 1 operation rather than 2. All RTC writes must be single operations to avoid partially correct data.
5) Some code cleanup
6) Tempchart face is added for temperature statistics

* Update set_time_hackwatch_face.c

* Math error in display code of finetune, allow to update correction time even without correction - by long alarm press

* Increase reliability of stopping & starting RTC timer

As it's quite dangerous operation

* hackwatch - days adjust down fix by long alarm

* unify style

* More comments & last style change

* Simulator support

RTC operations (watch_rtc_enable and watch_rtc_freqcorr_write) are in common libs.

* Unicode fix

* Crystal aging is now adjustable (AA page in nanosec - annual aging, ppm/year)

Aging is baked into fixed offset every time finetune is performed, as it relies on last adjustment time.

* Blink on non-0 page every minute in finetune to measure clock error

* Rolling back private changes

* Cleanup

* Cleanup

* Quality of life changes in nanosec

1. Does not calculate & apply ppm correction if less than 6 hours passed since previous adjustment (as it gives very high correction values which are unrealistic and unhelpful)
2. Idle timeout resets to face 0 only if no correction was made

* unify style

* Fix low-power errors in nanosec infrastructure, faster display in finetune

* Merge fix

* unify style

Co-authored-by: Jeremy O'Brien <neutral@fastmail.com>
Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
2023-01-10 16:56:26 -05:00
Jeremy O'Brien
3c576a83cf remove unnecessary conditional in simple clock face 2023-01-05 06:50:29 -05:00
joeycastillo
851d047c81 never disable buzzer output 2023-01-03 21:24:14 -06:00
TheOnePerson
cb69a2c181
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>
2022-10-25 21:57:53 -05:00
Joey Castillo
5cb68923b9 static analysis: use parentheses around binary operators 2022-04-10 14:45:21 -04:00
Joey Castillo
18302bf9c4 movement: add low battery warning to simple clock 2022-02-05 17:42:43 -05:00
David Keck
7de76465d7
Simple Clock: Update to signal exactly on the hour
I was getting the buzzer at 59 minutes past the hour, not exactly on the hour. This changes to buzzing at exactly HOUR:00:00. Tested this locally.
2022-01-19 12:06:12 -06:00
Joey Castillo
41eaa9c1c0 add MIT license text to movement files 2022-01-15 14:53:56 -05:00
Joey Castillo
6256e709bf movement: add hourly signal to simple clock face 2021-12-21 10:05:06 -06:00
Joey Castillo
60fe969191 Movement: give watch faces their index at setup time 2021-12-20 17:02:17 -06:00
Joey Castillo
ef40d58afc movement: refactor timeout to tick first, then notify 2021-11-07 00:29:27 -04:00
Joey Castillo
8f6cd8b290 move weekday lookup to new utilities file 2021-10-23 16:13:11 -04:00
Joey Castillo
148a47f76a movement: add tick animation in sleep mode 2021-10-19 15:37:08 -04:00
Joey Castillo
75be621914 movement settings: add timeout and LED duration 2021-10-19 13:46:25 -04:00
Joey Castillo
93624f0b69 add timeout event to give faces a chance to resign 2021-10-18 13:55:22 -04:00
Joey Castillo
0cfb37c671 early work on background tasks, documentation 2021-10-16 16:03:52 -04:00
Joey Castillo
3e539a9e63 screensaver mode is now low energy mode 2021-10-16 13:40:17 -04:00
Joey Castillo
d36331ce4e rename types to be more c-like 2021-10-16 13:26:23 -04:00
Joey Castillo
d5ac4cb71b widgets are now watch faces 2021-10-16 13:14:52 -04:00