Commit graph

113 commits

Author SHA1 Message Date
Christian Chapman 027e3bb42e
Morse-code based RPN calculator (#164)
* Added Morse code based RPN calculator

* added manual and memory register

* fixed morsecalc negative indicator, edited header comment

* adjusted stack display controls

* Fixed warnings. Added calculator token aliasing ability. Added binary shorthand for numeral entry. Extended morse code binary tree.

* ui tweaks

* Update movement_config.h

* silence warning

Co-authored-by: Christian Chapman <user@debian>
Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
2023-01-20 19:15:28 -06:00
EmilienCourt 9ebea46300
totp : rework and add SHA256/512 (#151)
* totp : rework and add SHA256/512

* totp : comment code

* totp : fix SHA224/SHA384 and examples

* totp : fix bug in totp_face_lfs

* totp : init_totp_record to SHA1

* totp : move TOTP-MCU to TOTP, update README and example

* totp : SHAX, use size_t n instead of harcoded 8

* clarify what to put in TOTP face

Co-authored-by: Emilien <Emilien>
Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
2023-01-14 11:58:03 -05:00
Niclas Hoyer 2e61885070
Add calculator watch face (#111) 2023-01-14 11:51:33 -05:00
TheOnePerson b28d31ba03
Interval timers face (#130)
* buzzer sequences: first draft, does not work on hardware yet (but in simulator)

* buzzer sequences: add changes to movement.c

* buzzer sequences: add demo face to Makefile

* buzzer sequences: fix problem of interrupted sounds. Add logic for repeating sub sequences. Tidy up (move logic to watch_buzzer files, remove buzzer_demo_face)

* buzzer sequences: tidy up even more

* buzzer sequences: disable registering a 32 Hz tick callback for watch faces, so it will be used exclusively by the buzzer sequences functionality

* buzzer sequences: add callback slot functionality to watch_rtc and make watch_buzzer use it. Switch internal buzzer sequences tick frequency to 64 Hz. Revert changes to movement.c

* interval face: add initial version

* interval face: fix theoretical problem in helper function

* buzzer sequences: fix parameter sanity check in watch_rtc code

* buzzer sequences/watch_rtc: optimize calling tick callbacks in RTC_Handler

* buzzer sequences/watch_rtc: fix error in calling callback functions

* buzzer sequences: revert changes to watch_rtc logic. Instead, use TC3 as the source for timing the sound sequences.

* buzzer sequences: fix frequency of callback

* buzzer sequences: integrate changes from PR #162 (set both CCBUF and PERFBUF for correct buzzer tone)

Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
2023-01-11 15:31:53 -05:00
Jeremy O'Brien a0524ba4e6 Implement tarot card face 2023-01-10 23:07:43 -05:00
Andrew Mike 280d8b246a
New watch face: Tally counter (tally_face) (#160)
* Add tally face

* Fix copyright block to reflect real author

* Fix indentation

* More style editing, edited comments

* silence warning in tally_face

Co-authored-by: Andrew Mike <andrew@7thmagic.net>
Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
2023-01-10 17:02:41 -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
Raymundo Cassani fee6145e4d
Add Tachymeter face (#165)
* Create template for tachymeter

* Basic working tachymeter

* Improve UI for running and results

* Allow editing distance

* Alarm long-press to enter and exit editing mode

* Improve light button behaviour

* Set distance digit wise.

* Use 250ms resolution for total time

* Improve comments

* Bugfix: Show distance when running and face becomes active

* Update `%d` to `%lu` in `sprintf` call for `uint32_t`

* Ignore Alarm button (Up and Long-press) when showing results

* Improve GUI when running and face gets activated

* Change speed indicator from `/H` to `/h`

* silence warnings in tachymeter face

Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
2023-01-10 16:43:04 -05:00
TheOnePerson d0a3fd2377
Add stock stopwatch face (#140)
* buzzer sequences: first draft, does not work on hardware yet (but in simulator)

* buzzer sequences: add changes to movement.c

* buzzer sequences: add demo face to Makefile

* buzzer sequences: fix problem of interrupted sounds. Add logic for repeating sub sequences. Tidy up (move logic to watch_buzzer files, remove buzzer_demo_face)

* buzzer sequences: tidy up even more

* buzzer sequences: disable registering a 32 Hz tick callback for watch faces, so it will be used exclusively by the buzzer sequences functionality

* buzzer sequences: add callback slot functionality to watch_rtc and make watch_buzzer use it. Switch internal buzzer sequences tick frequency to 64 Hz. Revert changes to movement.c

* buzzer sequences: fix parameter sanity check in watch_rtc code

* stock stopwatch: first fully functional implementation

* stock stopwatch: fix typo in comment

* stock stopwatch: handle resuming from deep sleep mode properly

* buzzer sequences/watch_rtc: optimize calling tick callbacks in RTC_Handler

* buzzer sequences/watch_rtc: fix error in calling callback functions

* stock stopwatch: implement workaround for sleep mode

* stock stopwatch: merge current main into stock-stopwatch

* stock stopwatch: use TC counters as source for callbacks

* stock-stopwatch: revert unnecessary changes to watch_buzzer

Co-authored-by: joeycastillo <joeycastillo@utexas.edu>
2023-01-10 16:31:32 -05:00
James Haggerty 529bad306d
RPN Calculator face (#112)
* Calculator face with guess a number

* Add more functions, cleanup, and blinking

* Display operations better in the first location

* Clean up stack behaviour

Add empty stack behaviour, check stack bounds, add stack operations.

Also, make 'mode' always work to switch through faces on entering calculator
(i.e. by defaulting to OPERATION rather than NUMBER).

Some edge cases.

* Tweak negative rounding behaviour; add basic doco

* Add copyright name.

* Flip ordering of binary operations

* Fix compiler warnings

* Remove watch_private_display hackery and give face a better name

Also, slightly clearer documentation and a dupe function.
2023-01-10 16:15:00 -05:00
joeycastillo 801230cc3a
Merge pull request #106 from niclashoyer/sailing
Add sailing watch face
2022-12-31 11:04:55 -06:00
Slim 9cb2d3278a Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main 2022-12-02 19:53:56 +01: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
joeycastillo 967da2465a new backer firmware with original lineup 2022-11-29 10:01:47 -06:00
James Haggerty ad6e919107 Separate emscripten build directory
This avoids the need to 'make clean' before you do a simulator build
(or vice-versa).
2022-11-02 06:18:34 +11:00
James Haggerty b7a461d280
Make the TOTP face use the filesystem for secret storage (#95)
* TOTP using filesystem

* Filesystem: ability to read files line by line
2022-11-01 01:08:05 -05: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
Niclas Hoyer 732a1caffe add sailing watch face 2022-10-23 00:27:32 +02:00
David Singleton dfb928b9d6
Adds a rate meter watchface (#101) 2022-10-18 23:30:05 -05:00
Joey Castillo 5bb058f585 add watch face for frequency correction and measurement 2022-10-09 22:50:31 -05:00
Joey Castillo bcd3b66684 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into lfs 2022-08-02 08:17:26 -06:00
joshber f120d66a98
Wake Face (#77)
Co-authored-by: Josh Berson <low.note0488@fastmail.com>
2022-07-25 11:57:12 -04:00
Spencer Bywater 96aaa47c8e
Probability watch face (#69)
* Initial work on probability watch face

* Complete probability watch face

* Restore default movement_config

* PR feedback: PR watch face title, use arc4random, clean up warnings

* Use rand instead of arc4random when building on emulator

* Accidentally overwrote movement_config
2022-05-18 11:11:34 -04:00
Joey Castillo 21ee056e26 first pass at filesystem in movement 2022-05-09 12:14:42 -04:00
Joey Castillo cd40573535 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into motion-express 2022-05-02 18:39:45 -05:00
Joey Castillo b0bdf35d8f add mechanism for building alternate firmware images 2022-04-20 17:21:47 -04:00
Joey Castillo 263e7c6543 add counter face to movement build 2022-04-20 15:48:04 -04:00
Joey Castillo 4bc4198cc6 Merge branch 'mars-clock' 2022-04-20 08:25:45 -04:00
Joey Castillo 6e9e264c65 rewrite lis2dh logger for lis2dw 2022-04-10 18:13:22 -04:00
Joey Castillo d91274e782 remove old lis2dh driver 2022-04-10 18:10:49 -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
Wesley Ellis 1ec1f2e420
Add tomato face: a pomodoro style timer (#61) 2022-04-06 14:33:24 -04:00
Joey Castillo 4ebc4e97ce movement: add thermistor testing watch face 2022-04-02 10:07:18 -04:00
Joey Castillo 3025984eb5 movement: first pass at mars clock 2022-03-04 16:29:21 -06:00
joeycastillo ccdf08da87
Movement: Astronomy and Orrery watch faces (#55) 2022-03-04 14:52:49 -06:00
Joey Castillo efde4190f1 movement: WIP app for capturing accelerometer data 2022-02-18 16:34:52 -05:00
Joey Castillo 4f29cf24f3 movement: move thermistor to 'sensor' watch faces 2022-02-17 14:47:47 -05:00
Joey Castillo 0fcc60e388 movement: add moon phase complication 2022-02-14 14:07:52 -05:00
Joey Castillo 2a59ae950f movement: add blinky face 2022-01-25 17:28:22 -05:00
Joey Castillo bcca6cc596 movement: remove blinky face 2022-01-25 17:27:46 -05:00
Joey Castillo f819a18791 movement: add template for watch face generator 2022-01-25 17:12:56 -05:00
Joey Castillo 2e345d9f66 movement: slight reorganization 2022-01-25 17:04:07 -05:00
Joey Castillo 249bfc183c movement: move beat time to clock folder 2022-01-25 15:39:04 -05:00
Joey Castillo 9e24f6c336 movement: add blinky face 2022-01-23 13:04:38 -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 221e41f58c add 'hello there' face, demo for documentation 2021-12-21 12:30:20 -06:00
Joey Castillo 616587a203 add demo watch face 2021-12-10 11:33:07 -05:00
Joey Castillo 0679d84c03 movement: add experimental accelerometer data logging face 2021-12-01 14:57:06 -05:00
Joey Castillo 002d368a25 movement: add world clock face 2021-11-26 13:43:47 -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 0f03257ee9 movement: add voltage monitor watch face 2021-11-06 23:52:00 -04:00
joeycastillo 0b4d0de15b
Merge pull request #19 from tahnok/beats_watch_face
Port beats to movement framework
2021-10-23 16:36:26 -04:00
Joey Castillo 27f699af80 WIP: thermistor data logger 2021-10-23 16:23:36 -04:00
Wesley Ellis 66e95e4ab8 Port beats to movement framework 2021-10-23 15:45:20 -04:00
Joey Castillo f1a706792e movement: add character set demo 2021-10-21 17:28:59 -04:00
Joey Castillo b88cd0cd7e movement: add thermistor readout face 2021-10-21 13:13:46 -04:00
Joey Castillo c27dbc779b fix misspelling of pulsometer 2021-10-16 16:51:36 -04:00
Joey Castillo d5ac4cb71b widgets are now watch faces 2021-10-16 13:14:52 -04:00
Joey Castillo e8461984d6 launcher is now movement 2021-10-16 12:58:14 -04:00