46 Commits

Author SHA1 Message Date
TheOnePerson
8f7452fd99 simple watch bin led: add functionality of representing the current time as binary code LED flashing. 2023-05-21 08:34:02 +02:00
Konrad Rieck
84b947766e
Alternative implementation of world clock (#216)
* 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>
2023-03-11 16:37:40 -05:00
Jonas Termeau
36ff634ced New face - Repetition Minute, fork of simple clock with an accessibility feature added : time reading via beeps 2023-02-02 23:07:24 +01:00
Jeremy O'Brien
a18c285e58 restore old light button behavior
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
2023-01-27 09:43:03 -06:00
Jeremy O'Brien
2b22ecc8e4 add default loop handler to all current watch faces 2023-01-25 09:23:50 -06: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
Jeremy O'Brien
8331a54896 Remove more unnecessary conditionals 2023-01-10 21:02:47 -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
Slim
a69547805b Weeknumber watch face
Same as simple clock, but has iso 8601 week number instead of seconds counter
2022-12-02 19:45:53 +01: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
4bc4198cc6 Merge branch 'mars-clock' 2022-04-20 08:25:45 -04:00
Joey Castillo
35172ce11a world clock: fix glitch when exiting settings mode 2022-04-10 15:18:36 -04:00
Joey Castillo
5cb68923b9 static analysis: use parentheses around binary operators 2022-04-10 14:45:21 -04:00
Joey Castillo
c4de155083 mars clock: formatting 2022-04-06 15:55:06 -04:00
Joey Castillo
cb609389eb mars clock: use S without cross-stroke for clarity 2022-04-06 15:54:31 -04:00
Joey Castillo
4e89d70f99 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into mars-clock 2022-04-06 14:56:18 -04:00
Joey Castillo
3ad093715d mars clock: add support for sols 2022-03-05 09:59:32 -05:00
Joey Castillo
08af2ed398 mars clock: adding additional sites 2022-03-04 16:30:18 -06:00
Joey Castillo
3025984eb5 movement: first pass at mars clock 2022-03-04 16:29:21 -06:00
Joey Castillo
ee95229e19 world clock: store settings in backup register if possible 2022-02-13 11:25:28 -05:00
Joey Castillo
0bb267c702 movement: start time zone list at UTC 2022-02-13 11:25:28 -05:00
Joey Castillo
18302bf9c4 movement: add low battery warning to simple clock 2022-02-05 17:42:43 -05:00
Joey Castillo
249bfc183c movement: move beat time to clock folder 2022-01-25 15:39:04 -05:00
Alexsander Akers
b8de35658f
Sensor Watch Simulator (#35)
* Put something on screen

* Use the 32bit watch_date_time repr to pass from JS

* Implement periodic callbacks

* Clear display on enabling

* Hook up watch_set_led_color() to SVG (green-only)

* Make debug output full-width

* Remove default Emscripten canvas

* Implement sleep and button clicks

* Fix time zone conversion bug in beats-time app

* Clean up warnings

* Fix pin levels

* Set time zone to browser value (if available)

* Add basic backup data saving

* Silence format specifier warnings in both targets

* Remove unnecessary, copied files

* Use RTC pointer to clear callbacks (if available)

* Use preprocessor define to avoid hardcoding MOVEMENT_NUM_FACES

* Change each face to const preprocessor definition

* Remove Intl.DateTimeFormat usage

* Update shell.html title, header

* Add touch start/end event handlers on SVG buttons

* Update shell.html

* Update folder structure (shared, simulator, hardware under watch-library)

* Tease out shared components from watch_slcd

* Clean up simulator watch_slcd.c inline JS calls

* Fix missing newlines at end of file

* Add simulator warnings (except format, unused-paremter)

* Implement remaining watch_rtc functions

* Fix button bug on mouse down then drag out

* Implement remaining watch_slcd functions

* Link keyboard events to buttons (for keys A, L, M)

* Rewrite event handling (mouse, touch, keyboard) in C

* Set explicit text UTF-8 charset in shell.html

* Address PR comments

* Remove unused directories from include paths
2022-01-25 15:03:22 -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
138b3d0c5e movement: reset tick to 1 Hz between watch faces (fixes #36) 2022-01-19 11:16:10 -05: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
762af872d2 fix missing prototype warnings 2021-12-10 12:00:26 -05:00
Joey Castillo
333c5e8b9e movement: remove TODO item (we profiled it, it's fine) 2021-12-01 09:07:40 -05:00
Joey Castillo
002d368a25 movement: add world clock face 2021-11-26 13:43:47 -05: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
05fe055f99 automatically determine number of watch faces 2021-10-16 16:34:12 -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