The DST code has not yet been fully tested, the upcoming movement
refactor is upon us and it will integrate with the micro timezone
library anyway. Revert it so that next can be merged into main.
This reverts commit 5a8a49a8c7, reversing
changes made to bfadb81e82.
The DST code has not yet been fully tested, the upcoming movement
refactor is upon us and it will integrate with the micro timezone
library anyway. Revert it so that next can be merged into main.
This reverts commit ac5bf8cfce, reversing
changes made to 5a8a49a8c7.
This reverts commit a715265af6, reversing
changes made to 9c093f9540.
Insidious issues were found in the course of long term testing
by the community, and further reviews of the code were not enough
to pinpoint the issue and fix it. So for now the appropriate action
is to revert these changes while development continues, and possibly
merge them back in once they have been stabilized.
Tested-on-hardware-by: David Volovskiy <devolov@gmail.com>
Tested-on-hardware-by: CarpeNoctem <cryptomax@pm.me>
Tested-on-hardware-by: Krzysztof Gałka <@kshysztof@Discord>
This commit caused state restored from backup registers
to be overwritten. It is thereby reverted until a better
solution is found or movement is refactored.
This reverts commit 524098b925.
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
References: https://github.com/joeycastillo/Sensor-Watch/pull/474
Implements logic to automatically offset daylight saving time settings
when calculating timezone offsets. This should make the DST functions
work automatically with no need for user input in most cases.
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/470
Adds a toggle in the preferences face that allows the user
to enable or disable the daylight savings time.
Should help produce the correct results with the sunrise/sunset presets.
A proper solution would be to integrate the tzinfo database
but it's too big for the watch at the time of this writing.
Can't be done unless it can be shrunk down into a subset
the user would be interested. Even then it's a stopgap
since the database is likely to keep growing over time.
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/268
Adds an instant LED duration preference that only keeps the LED lit
while the LIGHT button remains held down.
Matches the behavior of the original watch.
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
Tested-on-hardware-by: Wesley Aptekar-Cassels <me@wesleyac.com>
Tested-on-hardware-by: 814d3 (GitHub)
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/293
Adds a movement-wide leading zero 024h representation mode
that's toggleable in the preferences watch face.
Also adds support for the new display mode to existing faces.
I modified the logic a bit to ensure the 24h indicator remains lit
in the simple clock face even when in 024h mode. I also added support
to the more advanced clock face. In the future I will add a compile time
toggle to it as well.
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/299
Mechanical switches exhibit temporary voltage fluctuations
when electrical contact is made, which manifest as "bouncing"
between the logical high and low states. Sampling the switch's
state during this period of stability produces invalid results.
The switch must be debounced by ignoring the generated interrupts
until the switch's state has stabilized. This is implemented by delaying
the input events until an empirically determined time has elapsed.
As such this pull request introduces customizable high resolution timers
for debouncing button down and up events.
This software debouncing unfortunately increases the sensor watch's
input latency. This is an acceptable tradeoff due to better usability:
watch faces which require holding down buttons such as the pulsometer
should work much more reliably after this patch.
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
Tested-on-hardware-by: Krzysztof Gałka <@kshysztof@Discord>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/437
References: https://en.wikipedia.org/wiki/Switch#Contact_bounce
This illuminates the LED only for the time that the button is pressed,
and turns it off as soon as it's released, which is the behaviour of the
original watch.
I chose a led_duration of zero to represent "instant" and all bits set
to represent "no LED", which is arbitrary but seemed more sensible to
me.
* 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>
* 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>