22 Commits

Author SHA1 Message Date
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