Currently, movement drops time out events in case the previous loop
indicates that sleep is not possible due to short circuiting behavior
of logical and in C: if the left-hand side is false, the right hand
side is not evaluated at all, which means the loop is not called.
This was not intended to happen.
Fix it by storing the result in a second boolean variable
and working out the logic after the fact.
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.
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.
* 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>
* 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>