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.
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.
Instances of the pulsometer state structure are only passed
to the pulsometer itself and only via the opaque context pointer.
No other code uses it. There is no need to expose it in a header file
so make it an implementation detail of the watch face.
Update the copyrights to include full name attribution to all
who contributed to the pulsometer watch face, including myself.
Also add an SPDX license identifier header comment to the files.
Implements an advanced pulsometer that can be recalibrated by the user.
The main clock face now displays the measured pulses per minute.
The day of month digits now display the pulsometer calibration.
The light button now cycles through integer graduations
which now range from 1 to 39 pulses per minute.
Long presses of the light button cycle by 10 instead of 1.
The watch face's responsiveness to input has been carefully optimized.
The code has been reorganized and generally improved.
Update the copyrights to include full name attribution
to all who contributed to this watch face, including myself.
Also add an SPDX license identifier header comment to the files.
https://spdx.org/licenses/MIT.html
Using the new structured TOTP record data structure
allows the TOTP watch face to statically and implicitly
compute the total number of defined TOTP records.
Users can now simply add new keys and records in the designated area
and the watch face will compile and automatically use them with no need
to maintain a separate array size variable. Less chance of mistakes.
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.
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.
* 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