127 Commits

Author SHA1 Message Date
Wesley Aptekar-Cassels
4763568900 movement: default to "instant" led_duration.
This is a matter of personal preference, but "instant" is the behaviour
of the original watch, and seems like the thing more people would
expect. Feel free not to take this commit if you disagree, though.
2023-09-29 22:13:29 -04:00
Wesley Aptekar-Cassels
30195a2619 movement: Add "instant" led_duration option.
This illuminates the LED only for the time that the button is pressed,
and turns it off as soon as it's released, which is the behaviour of the
original watch.

I chose a led_duration of zero to represent "instant" and all bits set
to represent "no LED", which is arbitrary but seemed more sensible to
me.
2023-09-29 22:10:14 -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
bc9b4ce700 update alternate firmware for new board color 2023-09-13 14:08:52 -04:00
R. Alex Barbieri
f3c28ede96 add a manual dst toggle
Uses a simplistic set of jump tables to toggle daylight savings on and off.
2023-09-02 14:52:37 -05:00
joeycastillo
fd2c8c2065 add sensor watch lite 2023-08-17 14:35:51 -04:00
Jeremy O'Brien
c1580b356d
movement: add custom hourly chime tunes (#209)
* movement: add custom hourly chime tunes

* slightly tweak note timings

* add kim possible ringtone
2023-06-10 11:55:09 -04:00
joeycastillo
c945f323f4 fix for events firing way too fast 2023-01-27 00:08:36 -06:00
joeycastillo
f66b276dad add hardcoded frequency correction values 2023-01-25 10:37:16 -06:00
joeycastillo
4412b5d08f
Merge branch 'main' into default-handler 2023-01-25 09:26:31 -06:00
TheOnePerson
e8a18864ee
fix fast_tick_enabled behavior in movement (#183) 2023-01-23 15:26:03 -06:00
joeycastillo
9d47eb9a11 handle switch to secondary face in default handler 2023-01-15 09:28:41 -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
joeycastillo
967da2465a new backer firmware with original lineup 2022-11-29 10:01:47 -06:00
joeycastillo
59260c25de allow setting default LED colors in movement_config 2022-11-28 11:43:51 -06:00
TheOnePerson
cb678d735a
Merge branch 'main' into auto-fire-long-press 2022-10-26 06:43:47 +02: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
joeycastillo
894d3615e9
Merge pull request #103 from wryun/long-press-home-to-settings
Long press of mode on home screen goes to settings
2022-10-23 15:07:35 -05:00
joeycastillo
5c1e717034 make this an if/then to please emscripten 2022-10-23 15:05:28 -05:00
joeycastillo
46ac8defdc disable settings hiding by default 2022-10-23 14:59:57 -05:00
TheOnePerson
1a80003775 Movement: implement auto firing of long press events and introduce long up event. (Also re-implement alarm_enabled and alarm_note) 2022-10-23 13:07:32 +02:00
joeycastillo
b56c60868e allow watch faces to schedule tasks from background 2022-10-22 13:16:46 -05:00
Niclas Hoyer
86f34b3653 fix scheduled tasks scheduling another task 2022-10-21 01:10:12 +02:00
James Haggerty
b51f7b6f36 Long press of mode on home screen goes to settings
This also changes the default rotation so you don't see the settings
screens.
2022-10-19 10:30:59 +11:00
joeycastillo
1bb656db91 use watch_face_changed property 2022-10-12 00:20:11 -05:00
joeycastillo
957f97ffad no need to set this (set in movement_move_to_face) 2022-10-11 23:40:19 -05:00
joeycastillo
4de51740fb don't sleep on watch face change 2022-10-11 23:14:59 -05:00
James Haggerty
79ff361f06 Make long press mode go back to face 0 instead of next face 2022-10-12 13:35:08 +11:00
Joey Castillo
bcd3b66684 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into lfs 2022-08-02 08:17:26 -06:00
Joey Castillo
b234db74fe movement: wake programmatically from background and play alarm 2022-07-17 00:23:38 -05:00
Joey Castillo
e71a70d231 add file browser to movement, remove old app 2022-05-09 13:05:37 -04:00
Joey Castillo
22b1ac0283 simulator: add USB serial input field 2022-05-09 13:00:15 -04:00
Joey Castillo
e36af0e5a3 movement: only run custom commands at first launch 2022-04-21 15:37:12 -04:00
Joey Castillo
a6024e9fda stargazer firmware: make LED red by default 2022-04-21 13:40:58 -04:00
Joey Castillo
19dac66a3b freeze snapshot of standard firmware in alt_fw 2022-04-21 11:26:02 -04:00
Joey Castillo
b0bdf35d8f add mechanism for building alternate firmware images 2022-04-20 17:21:47 -04:00
Joey Castillo
0bb267c702 movement: start time zone list at UTC 2022-02-13 11:25:28 -05:00
Joey Castillo
96017d6ec1 movement: add mechanism for watch faces to use backup registers 2022-02-13 11:25:28 -05:00
Joey Castillo
b8cb6f3bcf movement: prevent invalid tick frequency from breaking scheduled tasks 2022-02-12 22:19:01 -05:00
Alexsander Akers
a4cb3c8594 Adjust function semantics by "flipping" bit order 2022-01-27 12:06:06 -05:00
Alexsander Akers
a559d089f1 Add new function to disable certain RTC periodic callbacks 2022-01-27 12:06:06 -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
Joey Castillo
99c518e421 movement: long press on MODE always dismisses the active face 2022-01-19 14:32:33 -05: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
5fccc24c98 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main 2022-01-15 19:27:24 -05:00
Joey Castillo
41eaa9c1c0 add MIT license text to movement files 2022-01-15 14:53:56 -05:00
Wesley Ellis
37ff7b9c26 Add movement_cancel_background_task
Provide a way for a scheduled background task to be cancelled
2022-01-01 14:13:04 -05:00
Joey Castillo
60fe969191 Movement: give watch faces their index at setup time 2021-12-20 17:02:17 -06:00