Commit graph

240 commits

Author SHA1 Message Date
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
Kyle Boyle 4bbb34992a Adds watch skin toggle to for model A158WEA-9 should one be feeling classy 2022-11-24 18:37:19 -04:00
Tom Hodson 3377b489c7 remove errant console.log 2022-11-22 14:39:46 +01:00
Tom Hodson 0b3a1ed244 WIP: Add support for bicolor led in the simulator
I noticed that the bicolor led isn't supported in the simulator. Here is a quick mockup of how I would add support for it.

I added an SVG filter to the #light rectangle in the SVG which lets us multiply the colours by a matrix in code. I then insert values so that the original green colour gets mixed into the combination of red and green requested by `watch_set_led_color`

# Testing
So far I've only tested this with the standard firmware build but it seems to work.

# Possible issues
I wasn't 100% sure what to do when red + green > 255, current behaviour is that it gets clamped to 255 in the simulator.
2022-11-22 14:30:24 +01:00
joeycastillo f79741a85f add delay_ms function for simulator 2022-10-11 22:11:58 -05:00
joeycastillo b399f4ca45 only include watch_main_loop.h in simulator builds 2022-10-11 22:06:02 -05:00
Joey Castillo 7fc4395298 add watch_reset_to_bootloader function (resolves #81) 2022-08-14 15:23:32 -05: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 5b650b9efe reduce flicker of LED by default 2022-07-04 11:23:09 -05:00
Joey Castillo ed526355f6 fix spaces / tabs 2022-05-10 09:50:44 -04: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 32c6974c0f usb serial: clear whole length of buffer 2022-05-09 10:59:15 -04:00
Joey Castillo 03b616da62 prevent buf from escaping into global namespace 2022-05-09 10:57:16 -04:00
Joey Castillo 0c87114ee1 simulator: fix _read function signature 2022-05-09 10:55:28 -04:00
Joey Castillo 661e2b6a73 add ability to read from USB serial 2022-05-08 20:19:20 -04:00
Joey Castillo d4ebe64af0 add support for a small filesystem on the watch 2022-05-06 17:12:14 -04:00
Joey Castillo 21026c8eb7 add room for flash filesystem in linker script 2022-05-06 15:17:57 -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 9c2b3b7c17 make 2022 the default year 2022-04-21 14:18:17 -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 6bdaff5d2a remove all deprecated functions 2022-04-10 15:56:45 -04:00
Joey Castillo 405f010ade static analysis: add comments to empty while loops 2022-04-10 15:08:47 -04:00
Joey Castillo d502a030e1 charset tweaks: no need to run deeper checks 2022-04-10 14:38:15 -04:00
Joey Castillo 5f0ebd8c66 character map tweaks: add some ligatures and symbols 2022-04-06 15:51:06 -04:00
Wesley Ellis 1ec1f2e420
Add tomato face: a pomodoro style timer (#61) 2022-04-06 14:33:24 -04:00
Joey Castillo 51e357d822 movement: final list of watch faces for stock firmware 2022-04-02 10:07:18 -04:00
joeycastillo ccdf08da87
Movement: Astronomy and Orrery watch faces (#55) 2022-03-04 14:52:49 -06:00
David Keck b8e191b615
Updated function brief 2022-02-22 21:37:16 -06:00
Joey Castillo 54f1873785 documentation and such 2022-02-19 14:22:23 -05:00
Joey Castillo 09f79f782f lis2dw: reasonable defaults when initializing 2022-02-19 14:05:38 -05:00
Joey Castillo ee60d97d25 fixup 2022-02-19 13:42:55 -05:00
Joey Castillo 9f0f72eb20 lis2dw: add support for temperature sensing 2022-02-19 13:12:04 -05:00
Joey Castillo 3392f73d36 lis2dw: add support for high performance mode 2022-02-19 13:11:47 -05:00
Joey Castillo b1bec8f187 lis2dw: add support for bandwidth filtering 2022-02-19 12:53:42 -05:00
Joey Castillo efde4190f1 movement: WIP app for capturing accelerometer data 2022-02-18 16:34:52 -05:00
Joey Castillo 8e1c7f0631 lis2dw: bugfix, only read once 2022-02-18 09:23:58 -05:00
Joey Castillo df2cc7e94f WIP accelerometer logging to flash 2022-02-18 00:05:57 -05:00
Joey Castillo 0c59c972e7 lis2dw: add FIFO support 2022-02-17 16:36:21 -05:00
Joey Castillo 4f29cf24f3 movement: move thermistor to 'sensor' watch faces 2022-02-17 14:47:47 -05:00
Joey Castillo 15cbe09410 move pins.h include to watch.h 2022-02-17 11:59:19 -05:00
Joey Castillo 2d9192dff1 remove obsolete low battery function from simulator 2022-02-13 23:32:17 -05:00
Joey Castillo c7f6387aee on second thought: keep BOD33 disabled in sleep mode 2022-02-13 16:04:21 -05:00
Joey Castillo b91f025542 enable high-efficiency low power regulator 2022-02-13 14:15:00 -05:00
Joey Castillo 203850104d remove obsolete low battery check 2022-02-13 14:01:21 -05:00
Joey Castillo 7815b0f64e always turn off PA20 at boot 2022-02-13 13:59:22 -05:00
Joey Castillo df3db08021 sleep / deepsleep: update low power numbers 2022-02-13 11:25:28 -05:00
Joey Castillo 5dac14974c osc32kctrl: implement CONF_SLCDCTRL_SRC setting 2022-02-11 12:22:11 -05:00
Joey Castillo 74f8747764 slcd: lower LCD refresh frequency (~57Hz -> ~34Hz) 2022-02-11 12:20:50 -05:00
Joey Castillo 21f8a9f7cf slcd: lower reference refresh frequency (saves energy) 2022-02-11 12:19:10 -05:00
Joey Castillo 87be905fee rtc: disable debouncing on external wake inputs 2022-02-11 12:18:16 -05:00
Joey Castillo 27fa69ccac eic: clock from OSCULP32K for power savings 2022-02-11 12:17:55 -05:00
Joey Castillo 108b9991d2 simulator: add geolocation support 2022-02-09 13:40:29 -05:00
Joey Castillo aae9160422 utility: add function for formatting a duration in days + HMS 2022-02-06 15:00:58 -05:00
Joey Castillo df0c2bfd80 remove debug statements 2022-02-05 17:33:34 -05:00
Joey Castillo a3085cb136 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch 2022-02-01 00:24:20 -05:00
Joey Castillo 518a9aa919 add function for converting to 12 hour time 2022-01-31 21:17:10 -08:00
joeycastillo 932e10529d
Merge pull request #43 from a2/rtc-disable-matching-mask
Add new function to disable certain RTC periodic callbacks
2022-01-27 14:33:45 -05:00
Joey Castillo 5fb8dabdd2 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main 2022-01-27 14:28:46 -05:00
Joey Castillo 45aa04f4ac spi test: set first 4096 bytes to 0 2022-01-27 14:28:37 -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 cb8223217b Update main loop to fix reentrancy runtime errors 2022-01-27 11:12:01 -05:00
Alexsander Akers a0f8e9c8bc Implement buzzer methods with AudioContext API 2022-01-27 11:12:01 -05:00
Joey Castillo 14e4562b7a add SPI to the index 2022-01-27 10:51:15 -05:00
Joey Castillo 523a5d2f0b implement SPI flash chip 2022-01-26 22:40:49 -05:00
Joey Castillo b2dbc4feeb silence compiler warning 2022-01-26 22:15:53 -05:00
Joey Castillo a11275d84c watch library: implement SPI 2022-01-26 21:33:05 -05:00
Joey Castillo 1b1bba2de0 silence compiler warning 2022-01-26 21:04:56 -05:00
Joey Castillo fe5a3eecff Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main 2022-01-26 20:36:49 -05:00
Joey Castillo d65103b03b silence compiler warnings 2022-01-26 20:16:52 -05:00
Joey Castillo 0c78fdf535 watch library: implement UART 2022-01-26 19:31:49 -05:00
Alexsander Akers 84b65cb699 Remove ADC_* defines in favor of hardware-specific mapping 2022-01-25 17:28:15 -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 68f17c8970 movement: add time zone conversion in sunrise/sunset face 2022-01-21 00:11:43 -05:00
Joey Castillo 3efdcd78a1 fix out of bounds access when position != 0 2022-01-19 17:22:31 -05:00
Joey Castillo 19fd519209 add gettimeofday function 2022-01-15 12:26:17 -05:00
Joey Castillo 68e792f9b7 lis2dw: add low power / low noise mode 2022-01-09 12:25:56 -05:00
Joey Castillo a102675522 set correct registers for range and rate 2022-01-09 12:12:41 -05:00
Joey Castillo 54762248a3 use lowest power LP mode 2022-01-09 12:06:44 -05:00
Joey Castillo 71c2eaa3f9 shuffle uart pins for new accelerometer board 2022-01-09 12:05:21 -05:00
Joey Castillo 5ceec26d5a start in low power mode 2022-01-09 12:02:58 -05:00
Joey Castillo 1ea476ca24 remove unused enums 2022-01-09 12:02:26 -05:00
Joey Castillo 496530c85c add driver, test app for LIS2DW accelerometer 2022-01-08 19:27:41 -05:00
Joey Castillo b341227797 add utility function to check if TCC is enabled 2021-12-21 10:01:33 -06:00
Joey Castillo 762af872d2 fix missing prototype warnings 2021-12-10 12:00:26 -05:00
Joey Castillo bbd394a19a use true random number generator to provide entropy 2021-12-03 21:12:15 -05:00
Joey Castillo b8c824419f remove A LOT of dead ASF lcd driver code 2021-12-02 22:50:47 -05:00
Joey Castillo 36be251e89 lis2dh: add support for interrupt latching (stays active until cleared) 2021-12-01 09:41:48 -05:00
Joey Castillo 45282f2ef4 lis2dh driver: add support for int2 pin 2021-11-30 20:02:41 -05:00
Joey Castillo 4ae46f907b lis2dh driver: add basic interrupt functionality 2021-11-30 19:33:49 -05:00
Joey Castillo 48ceef7af3 fix (most) external interrupts on the 9-pin connector 2021-11-30 17:02:42 -05:00
Joey Castillo 473bd1637a lis2dh driver: make the implicit explicit 2021-11-30 11:55:16 -05:00
Joey Castillo 812c6c2612 more character map edge cases 2021-11-29 10:28:02 -05:00
Joey Castillo 470544823b add LIS2DH accelerometer driver, test app 2021-11-27 13:32:33 -05:00
Joey Castillo 4a4ab81c6c remove log statements (oops) 2021-11-25 13:18:10 -05:00
Joey Castillo ac43c1ca48 utilities: convert unix timestamp to watch_date_time 2021-11-25 11:10:06 -05:00
Joey Castillo 5c3967aea2 movement: implement time zone setting 2021-11-25 10:36:01 -05:00
Wesley Ellis 653dd862b8 Fill out watch_utility_convert_to_unix_time 2021-11-23 21:32:25 -05:00