summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | faces/clock: simplify alarm indication functionMatheus Afonso Martins Moreira2024-02-251-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deduplicates state in the clock state and movement settings. Makes the code simpler. Also makes it use the correct indicator. For some reason it had been switched with the hourly chime indicator. WATCH_INDICATOR_BELL The small bell indicating that an alarm is set. WATCH_INDICATOR_SIGNAL The hourly signal indicator. Also useful for indicating that sensors are on.
| * | faces/clock: define general indication functionMatheus Afonso Martins Moreira2024-02-251-0/+8
| | | | | | | | | | | | Sets or clears the specified indicator based on some boolean value.
| * | faces/clock: move structure definitionMatheus Afonso Martins Moreira2024-02-252-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instances of the clock state structure are only passed to the clock face itself and only via the opaque context pointer. No other code uses it. Thus there is no need to expose it in a header file. So make it an implementation detail of the watch face by localizing it inside the translation unit.
| * | faces: rename simple_clock_face to clock_faceMatheus Afonso Martins Moreira2024-02-245-32/+33
| |/ | | | | | | | | It's not actually so simple and will only gain features from now on. Just "clock face" also feels more canonical.
* | Merge branch 'moon-phase-face-long-press-reset'Matheus Afonso Martins Moreira2024-03-081-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes a long press of the ALARM button reset the face to current day. Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-by: Wesley Aptekar-Cassels <me@wesleyac.com> Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/316
| * | moon_phase_face: Make alarm long-press reset to current day.Wesley Aptekar-Cassels2023-11-031-0/+4
| | |
* | | Merge branch 'compile-time-preferences'Matheus Afonso Martins Moreira2024-03-082-3/+73
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds overridable C preprocessor definitions for every user preference. Enables the user to set defaults and omit the preferences face. The default behavior of the watch is preserved. Suggested-by: Wesley Aptekar-Cassels <me@wesleyac.com> Implemented-by: madhogs <x3dh4vhf@duck.com> Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/295 GitHub-Related-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/291
| * \ \ Merge branch 'main' into preferences_in_configmadhogs2024-02-14134-792/+4320
| |\ \ \ | | | |/ | | |/|
| * | | add compile-time options for all preferences to movement_configmadhogs2023-10-022-3/+73
| | | |
* | | | Merge branch 'usb-improvements' into advancedMatheus Afonso Martins Moreira2024-03-0815-156/+816
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change newline prints to also send carriage return - Introduce shell module for serial shell with argument parsing - Introduce shell command list for compile time command registration - Refactor file system commands for shell subsystem - Introduce new shell commands: - 'help' command - 'flash' command to reset into bootloader - 'stress' tests CDC serial writes of various lengths - optional delay parameter - Harden USB handling - Hangs less - Drops fewer inputs - Circular buffers for both reads and writes Reported-by: Edward Shin <contact@edwardsh.in> Tested-by: Edward Shin <contact@edwardsh.in> Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Reviewed-by: James Haggerty <james@gruemail.com> Reviewed-by: Wesley Aptekar-Cassels <me@wesleyac.com> Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/344
| * | | | USB ImprovementsEdward Shin2024-01-0715-160/+820
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce shell module for basic serial shell with argument parsing * Introduce shell_cmd_list module for basic compile-time command registration * Harden USB handling to hang less and drop fewer inputs - Service tud_task() with periodic TC0 timer interrupt - Service cdc_task() with periodic TC1 timer interrupt - Handle shell servicing in main app loop - Add a circular buffering layer for reads/writes * Change newline prints to also send carriage return * Refactor filesystem commands for shell subsystem * Introduce new shell commands: - 'help' command - 'flash' command to reset into bootloader - 'stress' command to stress CDC writes Testing: * Shell validated on Sensor Watch Blue w/ Linux host * Shell validated in emscripten emulator * Tuned by spamming inputs during `stress` cmd until stack didn't crash
* | | | | Merge branch 'silicon-errata' into advancedMatheus Afonso Martins Moreira2024-03-0810-7/+63
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the recommended workarounds for numerous silicon errata, reducing power consumption and preventing freezes and hard faults. Tested-by: Alex Maestas <git@se30.xyz> Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-on-hardware-by: Alex Maestas <git@se30.xyz> Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Reviewed-by: Wesley Aptekar-Cassels <me@wesleyac.com> Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/340 GitHub-Related-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/361 GitHub-Related-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/359 Reference: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/Errata/SAM-L22-Family-Silicon-Errata-and-Data-Sheet-Clarification-DS80000782.pdf
| * | | | | annotate SLEEPCFG-register detailAlex Maestas2024-01-221-1/+7
| | | | | |
| * | | | | annotate voltage regulation erratumAlex Maestas2024-01-221-1/+3
| | | | | |
| * | | | | annotate SysTick erratumAlex Maestas2024-01-221-1/+2
| | | | | |
| * | | | | annotate TRNG erratum, address review commentAlex Maestas2024-01-225-16/+12
| | | | | |
| * | | | | make any unknown interrupts/faults reset the microcontrollerAlex Maestas2023-12-181-2/+1
| | | | | |
| * | | | | make the HAL sleep function obey the chip documentationAlex Maestas2023-12-183-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | the sleep mode doesn't get set immediately, and needs to be waited upon.
| * | | | | address SysTick erratum, which can hard-fault the chipAlex Maestas2023-12-181-1/+8
| | | | | |
| * | | | | fix simulator build by declaring Trng type as a void pointerAlex Maestas2023-12-172-0/+6
| | | | | |
| * | | | | work around silicon erratum in SUPC/VREGAlex Maestas2023-12-171-0/+4
| | | | | |
| * | | | | work around silicon erratum in TRNGAlex Maestas2023-12-174-4/+18
| |/ / / /
* | | | | Merge 'fix-sunrise-sunset-uninitialized'Matheus Afonso Martins Moreira2024-03-081-0/+2
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a crash due to use of uninitialized buffer when setting location. Reported-by: eshrh <esrh@gatech.edu> Fixed-by: Wesley Aptekar-Cassels <me@wesleyac.com> Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/329 GitHub-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/198 Fixes: https://github.com/joeycastillo/Sensor-Watch/issues/198
| * | | | sunrise_sunset_face: Fix use of uninitialized memory.Wesley Aptekar-Cassels2023-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was causing a crash in the simulator when setting the location. Fixes: #198
* | | | | Change inactivity deadlines: add 10 minutes and remove 2 days. (#365)Max Zettlmeißl2024-02-072-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I like to use the ten minute timeout on my watch and there are other people who have similar interests in a lower deadline. The two day deadline had to go to still accommodate the change within the three bit index. The default setting is still the one hour timeout.
* | | | | Merge pull request #362 from Kistelini/fixWesley Ellis2024-01-221-4/+3
|\ \ \ \ \ | | | | | | | | | | | | Revert "make the watch-face a global in movement.c, actually"
| * | | | | Revert "make the watch-face a global in movement.c, actually"Christian Buschau2024-01-211-4/+3
|/ / / / / | | | | | | | | | | | | | | | This reverts commit 0e801ed505cb0c368bf1eb0473058efb6c275a3e.
* | | | | Merge pull request #337 from theAlexes/theAlexes/wyoscan-zeroWesley Aptekar-Cassels2024-01-211-1/+1
|\ \ \ \ \ | | | | | | | | | | | | make the zero in wyoscan a little more visually appealing
| * | | | | make the zero in wyoscan a little more visually appealingAlex Maestas2023-12-081-1/+1
| | |/ / / | |/| | |
* | | | | Merge pull request #322 from WesleyAC/watch-face-save-loadWesley Aptekar-Cassels2024-01-214-0/+236
|\ \ \ \ \ | | | | | | | | | | | | Add save_load_face
| * \ \ \ \ Merge branch 'main' into watch-face-save-loadWesley Aptekar-Cassels2024-01-21129-782/+4075
| |\ \ \ \ \ | |/ / / / / |/| | | | |
* | | | | | Merge pull request #319 from WesleyAC/watch-face-day-night-percentageWesley Aptekar-Cassels2024-01-214-0/+207
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add day_night_percentage_face.
| * \ \ \ \ \ Merge branch 'main' into watch-face-day-night-percentageWesley Aptekar-Cassels2024-01-21127-782/+3868
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #318 from WesleyAC/watch-face-simple-coin-flipWesley Aptekar-Cassels2024-01-214-0/+203
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add simple_coin_flip_face
| * \ \ \ \ \ \ Merge branch 'main' into watch-face-simple-coin-flipWesley Aptekar-Cassels2024-01-21125-782/+3665
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge pull request #315 from WesleyAC/watch-face-solsticeWesley Aptekar-Cassels2024-01-214-0/+302
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add solstice_face
| * \ \ \ \ \ \ \ Merge branch 'main' into watch-face-solsticeWesley Aptekar-Cassels2024-01-21123-782/+3363
| |\ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #339 from theAlexes/theAlexes/cleanupWesley Aptekar-Cassels2024-01-212-20/+33
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | did a tiny bit of code cleanup, encountered a bug that might fix some sleep-mode issues
| * \ \ \ \ \ \ \ \ Merge branch 'main' into theAlexes/cleanupWesley Aptekar-Cassels2024-01-2115-33/+97
| |\ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | |
* | | | | | | | | | Merge pull request #360 from CarpeNoctem/compiler_warning_watch_face_indexWesley Aptekar-Cassels2024-01-211-0/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | template: fix compiler warning on watch_face_index as mentioned in PR269
| * | | | | | | | | | template: fix compiler warning on watch_face_index as mentioned in PR 269CarpeNoctem2024-01-171-0/+1
|/ / / / / / / / / /
* | | | | | | | | | Merge pull request #325 from WesleyAC/fix-le-buzzer-default-tuneWesley Aptekar-Cassels2024-01-1110-28/+85
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix buzzer in LE mode.
| * | | | | | | | | | movement: Use LE mode code to keep buzzer awake, instead of sleeping.Alex Maestas2024-01-091-26/+36
| | | | | | | | | | |
| * | | | | | | | | | buzzer: fix simulator build, refactor sequence_length.Wesley Aptekar-Cassels2024-01-094-12/+45
| | | | | | | | | | |
| * | | | | | | | | | Enable custom signal tones in LE mode.Wesley Aptekar-Cassels2024-01-098-54/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes movement_play_signal synchronous when in LE mode, despite using the underlying asynchronous API. It's a bit of a hack, but it should work well enough for now. This also moves the enabling/disabling of the buzzer into the movement_play_signal function, so that watch faces no longer have to do it.
| * | | | | | | | | | Use legacy buzzer functions when playing default tune.Wesley Aptekar-Cassels2024-01-092-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the default tune to be played in LE mode. Fixes: #275
| * | | | | | | | | | Revert "Merge pull request #283 from ↵Wesley Aptekar-Cassels2024-01-096-28/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | neutralinsomniac/fix_hourly_chime_background" This reverts commit 5c94111ea20e50cb9dab8f416603403185e933b3, reversing changes made to bc9b4ce700d3f12adc0daceaa880e3d638df0c2b.
* | | | | | | | | | | fix alternate firmware scriptjoeycastillo2024-01-101-2/+2
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #342 from theAlexes/theAlexes/nanosec-profile-bugWesley Aptekar-Cassels2024-01-091-1/+0
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | delete stray line of code that messed with correction profile
| * | | | | | | | | | delete stray line of code that messed with correction profile while ↵Alex Maestas2023-12-221-1/+0
| | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | adjusting cadence