38 Commits

Author SHA1 Message Date
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
Joey Castillo
9e24f6c336 movement: add blinky face 2022-01-23 13:04:38 -05:00
Joey Castillo
a21ad54aac movement: simple UI for entering wearer location 2022-01-21 11:25:43 -05:00
Joey Castillo
68f17c8970 movement: add time zone conversion in sunrise/sunset face 2022-01-21 00:11:43 -05:00
David Keck
caf41d28dd
Reset selection to 0 on resign from setting state
I believe this also needs to be set back to 0 so the setting screen will resume at minutes, not potentially at settings on next run.
2022-01-19 12:12:43 -06:00
Joey Castillo
138b3d0c5e movement: reset tick to 1 Hz between watch faces (fixes #36) 2022-01-19 11:16:10 -05:00
David Keck
01df0ea231
Changed reset mode to setting instead of waiting
After thinking about this, I think it is more intuitive that this would only apply when in setting mode.
2022-01-18 22:53:25 -05:00
David Keck
3d5ec1adda
Added ability to reset to default timer value
Added option to reset to the default timer value when in waiting mode and on long press of alarm. This was useful to me as I sometimes accidentally increase the timer value and then would need to loop around to get back to the default value.
2022-01-18 22:29:04 -05:00
Joey Castillo
903ae6eff8 movement: sunrise/sunset face documentation 2022-01-16 09:39:18 -05:00
Joey Castillo
010bb3be95 sunrise/sunset face: no need to update this every second 2022-01-15 19:35:47 -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
baf25aaa7a movement: add sunrise/sunset face 2022-01-15 19:23:49 -05:00
Wesley Ellis
02c84dfd97 Add Countdown Face
A simple countdown face using movement_schedule_background_task
so that it rings, even if the another face is active

Limited to 99 minutes and 59 seconds so that the watch isn't staying
out of deep sleep for too long
2022-01-15 17:49:00 -05:00
Joey Castillo
41eaa9c1c0 add MIT license text to movement files 2022-01-15 14:53:56 -05: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
2504a922a3 movement: help beats face update the screen less often 2021-12-01 11:30:19 -05:00
Joey Castillo
0f89c11eba movement: remove floating point math from beats face 2021-12-01 10:43:01 -05:00
Joey Castillo
aac7a2a854 movement: have beats and TOTP face use new time zone setting 2021-11-25 10:47:59 -05:00
Joey Castillo
1a1a862d79 movement: TOTP face, pad code with leading zeroes 2021-11-24 12:20:32 -05:00
Joey Castillo
169d4486f9 movement: make TOTP face go home on timeout 2021-11-24 12:18:28 -05:00
Wesley Ellis
121e6fd165 optimize totp face and add countdown 2021-11-23 21:40:27 -05:00
Wesley Ellis
b7ed9adb6c Add initial TOTP watch face impl
Vendor code from https://github.com/Netthaw/TOTP-MCU to do the
heavy lifting of computing SHA-1 and HMAC and the rest of TOTP

Also implement a date_time to unix timestamp method
2021-11-22 21:37:21 -05:00
Wesley Ellis
b0ec40ae46 Add stopwatch face to movement
Simple stopwatch that only counts seconds (not subseconds), minutes
and yes, even hours
2021-11-10 21:17:24 -05:00
Joey Castillo
1b4bfe35c2 movement: day one watch face, counts days from birth 2021-11-08 09:59:23 -06:00
Joey Castillo
82e7a61759 beat time: add low energy tick animation 2021-11-07 00:30:25 -04:00
Wesley Ellis
66e95e4ab8 Port beats to movement framework 2021-10-23 15:45:20 -04:00
Joey Castillo
75be621914 movement settings: add timeout and LED duration 2021-10-19 13:46:25 -04:00
Joey Castillo
1db9e18b92 pulsometer: rearrange switch for clarity 2021-10-18 13:55:30 -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
8dbbe92a9b pulsometer: make type more c-like 2021-10-18 11:27:36 -04:00
Joey Castillo
b4d4f62ba8 pulsometer: reset tick in resign function 2021-10-18 11:15:58 -04:00
Joey Castillo
c27dbc779b fix misspelling of pulsometer 2021-10-16 16:51:36 -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
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