summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/clock
Commit message (Collapse)AuthorAgeFilesLines
* faces: restore simple_clock_faceMatheus Afonso Martins Moreira2024-03-162-0/+223
| | | | Restore the original simple clock face as requested.
* faces/clock: add 24h only featureMatheus Afonso Martins Moreira2024-03-051-2/+11
| | | | | | | The clock watch face can now be configured at build time to only display the time in 24h mode. Also enabled in forced 24h mode. This should result in smaller code size due to dead code elimination.
* faces/clock: update copyrights and creditsMatheus Afonso Martins Moreira2024-03-052-2/+16
| | | | | | | Update the copyrights to include full name attribution to all who contributed to the clock watch face, including myself. Also add an SPDX license identifier header comment to the files.
* faces/clock: indicate low power only when neededMatheus Afonso Martins Moreira2024-02-251-5/+6
| | | | | There is no need to set the indicator on every clock tick. Indicate only when the battery is checked.
* faces/clock: indicate alarm only when necessaryMatheus Afonso Martins Moreira2024-02-251-2/+0
| | | | | The alarm state is not modified within the clock face. Therefore, it only needs to be set when the face is activated.
* faces/clock: refactor time signal toggling codeMatheus Afonso Martins Moreira2024-02-251-2/+6
| | | | Simplifies the code by defining dedicated functions for this.
* faces/clock: refactor clock display codeMatheus Afonso Martins Moreira2024-02-251-14/+20
| | | | Simplifies the code by defining dedicated functions for this.
* faces/clock: reorder periodic battery checkMatheus Afonso Martins Moreira2024-02-251-3/+2
| | | | | Check the battery after the time has been updated. Place all the indication code next to each other.
* faces/clock: refactor partial time display codeMatheus Afonso Martins Moreira2024-02-251-24/+40
| | | | Simplifies the code by defining dedicated functions for this.
* faces/clock: refactor full time display codeMatheus Afonso Martins Moreira2024-02-251-1/+19
| | | | Simplifies the code by defining dedicated functions for this.
* faces/clock: refactor tick tock animation codeMatheus Afonso Martins Moreira2024-02-251-3/+15
| | | | Simplifies the code by defining dedicated functions for this.
* faces/clock: refactor low power tick functionMatheus Afonso Martins Moreira2024-02-251-12/+26
| | | | | | | Simplifies the code by defining dedicated functions and separating the case from the main ones. Also use the snprintf function since the buffer size is known.
* faces/clock: simplify LAP indication functionMatheus Afonso Martins Moreira2024-02-251-3/+6
| | | | | Simplifies the code by adding a dedicated function for this. Also documents the meaning of the LAP indicator: Low Available Power.
* faces/clock: refactor daily battery checkMatheus Afonso Martins Moreira2024-02-251-11/+21
| | | | | Move the code in question to a dedicated function. Better organized. Add overridable preprocessor definition for the low battery threshold.
* faces/clock: simplify PM indication functionMatheus Afonso Martins Moreira2024-02-251-7/+21
| | | | Simplifies the code by adding dedicated functions for this.
* faces/clock: simplify 24h indication functionMatheus Afonso Martins Moreira2024-02-251-2/+5
| | | | Simplifies the code by adding a dedicated function for this.
* faces/clock: simplify signal indication functionMatheus Afonso Martins Moreira2024-02-251-10/+10
| | | | | | | | | | | | Simplifies the code and makes it use the correct indicator. For some reason it had been switched with the alarm indicator. WATCH_INDICATOR_BELL The small bell indicating that an alarm is set. WATCH_INDICATOR_SIGNAL The hourly signal indicator. Also useful for indicating that sensors are on.
* faces/clock: simplify alarm indication functionMatheus Afonso Martins Moreira2024-02-251-10/+8
| | | | | | | | | | | | | | | | Deduplicates state in the clock state and movement settings. Makes the code simpler. Also makes it use the correct indicator. For some reason it had been switched with the hourly chime indicator. WATCH_INDICATOR_BELL The small bell indicating that an alarm is set. WATCH_INDICATOR_SIGNAL The hourly signal indicator. Also useful for indicating that sensors are on.
* faces/clock: define general indication functionMatheus Afonso Martins Moreira2024-02-251-0/+8
| | | | Sets or clears the specified indicator based on some boolean value.
* faces/clock: move structure definitionMatheus Afonso Martins Moreira2024-02-252-9/+9
| | | | | | | | | | | Instances of the clock state structure are only passed to the clock face itself and only via the opaque context pointer. No other code uses it. Thus there is no need to expose it in a header file. So make it an implementation detail of the watch face by localizing it inside the translation unit.
* faces: rename simple_clock_face to clock_faceMatheus Afonso Martins Moreira2024-02-242-29/+30
| | | | | It's not actually so simple and will only gain features from now on. Just "clock face" also feels more canonical.
* Merge pull request #337 from theAlexes/theAlexes/wyoscan-zeroWesley Aptekar-Cassels2024-01-211-1/+1
|\ | | | | make the zero in wyoscan a little more visually appealing
| * make the zero in wyoscan a little more visually appealingAlex Maestas2023-12-081-1/+1
| |
* | Merge branch 'main' into watch-face-day-night-percentageWesley Aptekar-Cassels2024-01-2116-91/+539
|\ \
| * | Enable custom signal tones in LE mode.Wesley Aptekar-Cassels2024-01-094-44/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Revert "Merge pull request #283 from ↵Wesley Aptekar-Cassels2024-01-094-8/+46
| |/ | | | | | | | | | | | | neutralinsomniac/fix_hourly_chime_background" This reverts commit 5c94111ea20e50cb9dab8f416603403185e933b3, reversing changes made to bc9b4ce700d3f12adc0daceaa880e3d638df0c2b.
| * Fix missing documentation for many clock faces:Alex Utter2023-11-2712-87/+215
| | | | | | | | | | * Move from .c to .h as needed for consistency. * When missing from both, copy from pull request or wiki. * When missing entirely, infer functionality from source code.
| * Add minute repeater decimal faceBrian Blakley2023-10-242-0/+322
| |
* | day_night_percentage_face: Clear seconds digits when entering LE mode.Wesley Aptekar-Cassels2023-11-091-1/+1
| |
* | day_night_percentage_face: Use PM indicator instead of DA/NI.Wesley Aptekar-Cassels2023-11-092-11/+16
| | | | | | | | This allows for use of the weekday digits for displaying the weekday.
* | day_night_percentage_face: Calculate rise/set/daylen only once per day.Wesley Aptekar-Cassels2023-11-092-35/+53
| |
* | Add day_night_percentage_face.Wesley Aptekar-Cassels2023-11-092-0/+182
|/
* use movement_play_signal for default tune (fixes background signal)joeycastillo2023-09-241-0/+4
|
* move buzzer enabled detection logic into movement for movement_play_signal/tuneJeremy O'Brien2023-09-234-20/+4
| | | | | this way watch faces don't have to disable/enable the buzzer themselves before calling movement_play_signal() and movement_play_tune()
* fix signal tunes not firing in background, and split out ↵Jeremy O'Brien2023-09-224-31/+5
| | | | foreground/background chime functions
* Decimal time face (#260)mrbrown82023-07-292-0/+252
| | | | | | | | | | | * Update movement_faces.h adding decimal_time_face.h to build * Decimal Time, a new clock face This face presents the current time as hours and hundredths of an hour. * add decimal time to Makefile
* Wyoscan .5 hz watchface (#256)Willy Hardy2023-07-292-0/+284
| | | | | | | | | | | | | | | | | | | | | | | | | * initial wyoscan commit * initial attempt at animation * kinda working * visually working but running out of memory * slower * little fixes * add hardware watch blink function * refine number animation * remove movement from config for merging * silence warnings --------- Co-authored-by: Willy Hardy <whardy@redhat.com>
* simple watch bin led: add functionality of representing the current time as ↵TheOnePerson2023-05-212-0/+312
| | | | binary code LED flashing.
* Alternative implementation of world clock (#216)Konrad Rieck2023-03-112-0/+513
| | | | | | | | | | | * Implementation of alternative world clock. * Fixed two minor bugs - Only start in settings mode on first activation - Fixed typo in time zone names --------- Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
* New face - Repetition Minute, fork of simple clock with an accessibility ↵Jonas Termeau2023-02-022-0/+314
| | | | feature added : time reading via beeps
* restore old light button behaviorJeremy O'Brien2023-01-271-0/+3
| | | | | watch faces that handle EVENT_LIGHT_BUTTON_UP but not EVENT_LIGHT_BUTTON_DOWN probably don't want the default EVENT_LIGHT_BUTTON_DOWN LED activation behavior
* add default loop handler to all current watch facesJeremy O'Brien2023-01-253-19/+4
|
* Merge branch 'main' into default-handlerjoeycastillo2023-01-172-2/+22
|\
| * Revert "never disable buzzer output"joeycastillo2023-01-172-2/+22
| | | | | | | | This reverts commit 851d047c818dacc30c86f4d87f33247dcfb0095c.
* | add movement_default_loop_handler, test with default watch facesjoeycastillo2023-01-142-14/+2
|/
* Remove more unnecessary conditionalsJeremy O'Brien2023-01-101-7/+1
|
* Precision watch update (#152)Mikhail Svarichevsky2023-01-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* remove unnecessary conditional in simple clock faceJeremy O'Brien2023-01-051-7/+1
|
* never disable buzzer outputjoeycastillo2023-01-032-8/+0
|
* Weeknumber watch faceSlim2022-12-022-0/+224
| | | | Same as simple clock, but has iso 8601 week number instead of seconds counter