]> git.earman.xyz Git - sensor-watch.git/log
sensor-watch.git
23 months agoAdd auto-repeat feature to Countdown watch face
Joseph Bryant [Sat, 24 Aug 2024 11:02:50 +0000 (12:02 +0100)]
Add auto-repeat feature to Countdown watch face

23 months agoMerge PR #465 - add metal gear solid codec chime
Matheus Afonso Martins Moreira [Sat, 7 Sep 2024 19:43:00 +0000 (16:43 -0300)]
Merge PR #465 - add metal gear solid codec chime

Snake? Snake?! SNAAAAAAAAAAAAAAAAAAAAAAKE!

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/465

23 months agoadd metal gear solid codec tune
Jeremy O'Brien [Wed, 4 Sep 2024 01:43:25 +0000 (21:43 -0400)]
add metal gear solid codec tune

23 months agoMerge PR #467 - add harry potter chimes
Matheus Afonso Martins Moreira [Sat, 7 Sep 2024 19:26:10 +0000 (16:26 -0300)]
Merge PR #467 - add harry potter chimes

Add Harry Potter themed hourly signal chimes, short and long variants.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/467

23 months agoslightly shorter first note
mcguirepr89 [Fri, 6 Sep 2024 14:19:17 +0000 (10:19 -0400)]
slightly shorter first note

23 months agoadds a short and long harry potter signal
mcguirepr89 [Wed, 4 Sep 2024 15:46:33 +0000 (11:46 -0400)]
adds a short and long harry potter signal

23 months agoMerge PR #293 - add instant LED duration
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 22:02:21 +0000 (19:02 -0300)]
Merge PR #293 - add instant LED duration

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

23 months agoMerge PR #419 - add endless runner watch face
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 21:28:18 +0000 (18:28 -0300)]
Merge PR #419 - add endless runner watch face

Adds an endless runner game face to the Sensor Watch.

The player character runs endlessly towards the right.
An endless number of obstacles speed towards him.
The player must jump over them or lose the game
when the player character runs smack into the obstacle.
Jumping requires fuel which is a limited resource
that must be managed by the player.

Features selectable difficulties and high score tracking.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/419

23 months agoMerge PR #436 - add wordle watch face
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 20:22:41 +0000 (17:22 -0300)]
Merge PR #436 - add wordle watch face

Ports the famous Wordle game to the Sensor Watch.

A random 5 letter word is chosen and the player must guess it
without exceeding the configured maximum number of attempts.
Letters guessed correctly will stay in place.
Letters present in the word but in the wrong place will blink.

Streak tracking is supported and compile time configurable.

A Python script which finds an optimal dictionary is also included
and can be used to further customize the watch face.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/436

23 months agoMerge PR #299 - leading zero representation
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 21:49:13 +0000 (18:49 -0300)]
Merge PR #299 - leading zero representation

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

23 months agoReduced struct memory per code review
David Volovskiy [Tue, 3 Sep 2024 21:13:59 +0000 (17:13 -0400)]
Reduced struct memory per code review

23 months agoInclude ability to select only the best words as the first choice
David Volovskiy [Tue, 3 Sep 2024 21:09:52 +0000 (17:09 -0400)]
Include ability to select only the best words as the first choice

23 months agogot rid of hardcoding of half-second zero blink
David Volovskiy [Tue, 3 Sep 2024 20:25:05 +0000 (16:25 -0400)]
got rid of hardcoding of half-second zero blink

23 months agoChanged U LOSE to LOSE
David Volovskiy [Tue, 27 Aug 2024 17:09:44 +0000 (13:09 -0400)]
Changed U LOSE to LOSE

23 months agobug fix on displaying time in LE mode
David Volovskiy [Fri, 26 Jul 2024 10:10:26 +0000 (06:10 -0400)]
bug fix on displaying time in LE mode

23 months agoLE mode in the endless runner now displays the current time.
David Volovskiy [Thu, 25 Jul 2024 01:12:17 +0000 (21:12 -0400)]
LE mode in the endless runner now displays the current time.

23 months agoAdded second fuel mode where we don't recharge the fuel if it hits zero.
David Volovskiy [Thu, 25 Jul 2024 01:08:35 +0000 (21:08 -0400)]
Added second fuel mode where we don't recharge the fuel if it hits zero.

23 months agoAdded fuel mode
David Volovskiy [Thu, 25 Jul 2024 01:03:54 +0000 (21:03 -0400)]
Added fuel mode

23 months agoChanged hi score number offset and refactored some code
David Volovskiy [Wed, 24 Jul 2024 03:31:13 +0000 (23:31 -0400)]
Changed hi score number offset and refactored some code

23 months agoAdded author in header
David Volovskiy [Tue, 23 Jul 2024 21:52:50 +0000 (17:52 -0400)]
Added author in header

23 months agoRefectored the state machine
David Volovskiy [Sat, 20 Jul 2024 13:43:49 +0000 (09:43 -0400)]
Refectored the state machine

23 months agoModified hi score display to allow for 3 digits in hi-score, it now resets at the...
David Volovskiy [Sat, 20 Jul 2024 11:48:50 +0000 (07:48 -0400)]
Modified hi score display to allow for 3 digits in hi-score, it now resets at the beginning of each month

23 months agohi score resets weekly
David Volovskiy [Sat, 20 Jul 2024 10:46:08 +0000 (06:46 -0400)]
hi score resets weekly

23 months agoReformat to remove some hardocded variables
David Volovskiy [Fri, 19 Jul 2024 12:43:15 +0000 (08:43 -0400)]
Reformat to remove some hardocded variables

23 months agoAdded baby mode which used to be easy mode; easy mode is now same speed as normal...
David Volovskiy [Wed, 17 Jul 2024 21:05:48 +0000 (17:05 -0400)]
Added baby mode which used to be easy mode; easy mode is now same speed as normal, but 3 frames to jump and normal is 2 frames.

23 months agoGave an extra jumping frame for non-hard mode; Curr scroll now loops; Title changed...
David Volovskiy [Wed, 17 Jul 2024 02:35:07 +0000 (22:35 -0400)]
Gave an extra jumping frame for non-hard mode; Curr scroll now loops; Title changed to ER

23 months agoFixed the long delays when beginning a game
David Volovskiy [Tue, 16 Jul 2024 13:29:19 +0000 (09:29 -0400)]
Fixed the long delays when beginning a game

23 months agoRemoved the binary print debug function
David Volovskiy [Tue, 16 Jul 2024 12:51:45 +0000 (08:51 -0400)]
Removed the binary print debug function

23 months agoAdded endless-runner face
David Volovskiy [Tue, 16 Jul 2024 12:50:11 +0000 (08:50 -0400)]
Added endless-runner face

23 months agoAdded ability to find best starting word
David Volovskiy [Tue, 3 Sep 2024 14:15:48 +0000 (10:15 -0400)]
Added ability to find best starting word

23 months agohard mode btn changed; logic changed on daily streak so if puzzle wasn't started...
David Volovskiy [Thu, 29 Aug 2024 01:38:09 +0000 (21:38 -0400)]
hard mode btn changed; logic changed on daily streak so if puzzle wasn't started and completed the previous day, then drop the streak

23 months agoStreak face fix
David Volovskiy [Tue, 27 Aug 2024 17:08:13 +0000 (13:08 -0400)]
Streak face fix

23 months agoWORDLE_USE_DAILY_STREAK logic changed
David Volovskiy [Tue, 27 Aug 2024 16:31:22 +0000 (12:31 -0400)]
WORDLE_USE_DAILY_STREAK logic changed

23 months agoWordle game resets after 24hrs of not playing when not using daily streak
David Volovskiy [Tue, 27 Aug 2024 16:08:24 +0000 (12:08 -0400)]
Wordle game resets after 24hrs of not playing when not using daily streak

23 months agoReset streak if don't continue
David Volovskiy [Tue, 27 Aug 2024 02:24:33 +0000 (22:24 -0400)]
Reset streak if don't continue

23 months agoChanged the lap to hard mode; fixed the ignore used letters
David Volovskiy [Tue, 27 Aug 2024 01:10:00 +0000 (21:10 -0400)]
Changed the lap to hard mode; fixed the ignore used letters

23 months agoRevert "LAP indicator now dispalys on all screens"
David Volovskiy [Mon, 26 Aug 2024 23:52:15 +0000 (19:52 -0400)]
Revert "LAP indicator now dispalys on all screens"

This reverts commit 3bfa336b4d609668f6d8c71164f8f579f41240a5.

23 months agoDocumentation fix
David Volovskiy [Sun, 25 Aug 2024 16:38:08 +0000 (12:38 -0400)]
Documentation fix

23 months agoAdded explanation on LAP icon
David Volovskiy [Sun, 25 Aug 2024 16:36:04 +0000 (12:36 -0400)]
Added explanation on LAP icon

23 months agoLAP indicator now dispalys on all screens
David Volovskiy [Sun, 25 Aug 2024 16:23:35 +0000 (12:23 -0400)]
LAP indicator now dispalys on all screens

23 months agoskip_wrong_letter is now a toggle
David Volovskiy [Sun, 25 Aug 2024 16:18:27 +0000 (12:18 -0400)]
skip_wrong_letter is now a toggle

23 months agoChanged variable names for dictionary header
David Volovskiy [Sun, 25 Aug 2024 14:35:58 +0000 (10:35 -0400)]
Changed variable names for dictionary header

23 months agoName change in python script
David Volovskiy [Sun, 25 Aug 2024 14:12:08 +0000 (10:12 -0400)]
Name change in python script

23 months agoMade skipping a wrong letters a #define
David Volovskiy [Sun, 25 Aug 2024 14:03:38 +0000 (10:03 -0400)]
Made skipping a wrong letters a #define

23 months agoChanged size of word lists from const int to #define to avoid folding constant array...
David Volovskiy [Sun, 25 Aug 2024 13:59:04 +0000 (09:59 -0400)]
Changed size of word lists from const int to #define to avoid folding  constant array error

23 months agoAdded ability to skip already guessed letters that are wrong
David Volovskiy [Sun, 25 Aug 2024 13:51:08 +0000 (09:51 -0400)]
Added ability to skip already guessed letters that are wrong

23 months agoAdded ability to guess non-dict words and repeats as that can save 11.5KB of watch...
David Volovskiy [Sun, 25 Aug 2024 11:15:08 +0000 (07:15 -0400)]
Added ability to guess non-dict words and repeats as that can save 11.5KB of watch memory

23 months agothe dict of words to its own header
David Volovskiy [Sun, 25 Aug 2024 10:50:00 +0000 (06:50 -0400)]
the dict of words to its own header

23 months agoReadding comment showing count of possible words.
David Volovskiy [Sat, 24 Aug 2024 14:36:38 +0000 (10:36 -0400)]
Readding comment showing count of possible words.

23 months agoAdded ability to use T in Wordle
David Volovskiy [Fri, 23 Aug 2024 20:48:09 +0000 (16:48 -0400)]
Added ability to use T in Wordle

23 months agomodified Wordle list to use Wordle's own list and add 2 more letters
David Volovskiy [Fri, 23 Aug 2024 20:39:53 +0000 (16:39 -0400)]
modified Wordle list to use Wordle's own list and add 2 more letters

23 months agoBugfix on elements not resetting when winning or losing
David Volovskiy [Mon, 19 Aug 2024 04:13:18 +0000 (00:13 -0400)]
Bugfix on elements not resetting when winning or losing

23 months agoJOB to JOb
David Volovskiy [Mon, 19 Aug 2024 03:58:39 +0000 (23:58 -0400)]
JOB to JOb

23 months agoFixed the bug of the text not resetting after a timeout
David Volovskiy [Mon, 19 Aug 2024 03:55:54 +0000 (23:55 -0400)]
Fixed the bug of the text not resetting after a timeout

23 months agoFix on playing with daily streak
David Volovskiy [Mon, 19 Aug 2024 03:10:17 +0000 (23:10 -0400)]
Fix on playing with daily streak

23 months agoBetter handling of seeing if currently playing
David Volovskiy [Mon, 19 Aug 2024 02:52:10 +0000 (22:52 -0400)]
Better handling of seeing if currently playing

23 months agoGot rid of continue's blinking
David Volovskiy [Mon, 19 Aug 2024 02:33:03 +0000 (22:33 -0400)]
Got rid of continue's blinking

23 months agoContinue test now blinks
David Volovskiy [Mon, 19 Aug 2024 02:30:41 +0000 (22:30 -0400)]
Continue test now blinks

23 months agoAdded continue screen
David Volovskiy [Sun, 18 Aug 2024 22:33:38 +0000 (18:33 -0400)]
Added continue screen

23 months agoAdded SONIC and LASER to the allowed words
David Volovskiy [Sun, 18 Aug 2024 14:46:33 +0000 (10:46 -0400)]
Added SONIC and LASER to the allowed words

23 months agoFixed leaving the screen and coming back
David Volovskiy [Sun, 18 Aug 2024 14:35:36 +0000 (10:35 -0400)]
Fixed leaving the screen and coming back

23 months agocombined two areas of code into one function
David Volovskiy [Sat, 17 Aug 2024 23:36:19 +0000 (19:36 -0400)]
combined two areas of code into one function

23 months agoDon't delete the submitted characters if already guessed or not in dict
David Volovskiy [Sat, 17 Aug 2024 17:22:03 +0000 (13:22 -0400)]
Don't delete the submitted characters if already guessed or not in dict

23 months agoSwapped the Nice and Job so the Nice text is more likely to appear first.
David Volovskiy [Sat, 17 Aug 2024 16:35:48 +0000 (12:35 -0400)]
Swapped the Nice and Job so the Nice text is more likely to appear first.

23 months agoRemoved wordle from movmeent face after testing
David Volovskiy [Sat, 17 Aug 2024 15:52:42 +0000 (11:52 -0400)]
Removed wordle from movmeent face after testing

23 months agoUSE_RANDOM_GUESS variable added
David Volovskiy [Sat, 17 Aug 2024 15:50:07 +0000 (11:50 -0400)]
USE_RANDOM_GUESS variable added

23 months agoGave the wordle face the ability to give random guesses on the first word
David Volovskiy [Sat, 17 Aug 2024 15:36:35 +0000 (11:36 -0400)]
Gave the wordle face the ability to give random guesses on the first word

23 months agobug fix on max score
David Volovskiy [Sat, 17 Aug 2024 13:49:48 +0000 (09:49 -0400)]
bug fix on max score

23 months agoAble to turn the expanded dict on and off with a variable
David Volovskiy [Sat, 17 Aug 2024 10:22:24 +0000 (06:22 -0400)]
Able to turn the expanded dict on and off with a variable

23 months agoAdded expanded dictionary to check against
David Volovskiy [Sat, 17 Aug 2024 10:19:31 +0000 (06:19 -0400)]
Added expanded dictionary to check against

23 months agobugfix on iterating to previous position
David Volovskiy [Sat, 17 Aug 2024 10:33:14 +0000 (06:33 -0400)]
bugfix on iterating to previous position

23 months agoAdded documentation for Wordle face
David Volovskiy [Sat, 17 Aug 2024 06:13:26 +0000 (02:13 -0400)]
Added documentation for Wordle face

23 months agoAnother fix on the word_check
David Volovskiy [Thu, 15 Aug 2024 22:12:54 +0000 (18:12 -0400)]
Another fix on the word_check

23 months agoDon't allow readding already guessed items
David Volovskiy [Thu, 15 Aug 2024 21:40:04 +0000 (17:40 -0400)]
Don't allow readding already guessed items

23 months agoFace compares the values correctly now and does a dict lookup first
David Volovskiy [Thu, 15 Aug 2024 21:02:14 +0000 (17:02 -0400)]
Face compares the values correctly now and does a dict lookup first

23 months agoSwapped button mapping and removed fast iteration
David Volovskiy [Thu, 15 Aug 2024 12:59:22 +0000 (08:59 -0400)]
Swapped button mapping and removed fast iteration

23 months agoAdded fast cycle
David Volovskiy [Thu, 15 Aug 2024 12:56:49 +0000 (08:56 -0400)]
Added fast cycle

23 months agoday streak and further wordle dev
David Volovskiy [Thu, 15 Aug 2024 12:17:10 +0000 (08:17 -0400)]
day streak and further wordle dev

23 months agoChanged dict to a smaller and simpler one
David Volovskiy [Thu, 15 Aug 2024 03:31:00 +0000 (23:31 -0400)]
Changed dict to a smaller and simpler one

23 months agoContinued Wordle dev
David Volovskiy [Thu, 15 Aug 2024 03:13:34 +0000 (23:13 -0400)]
Continued Wordle dev

23 months agoStart of Wordle
David Volovskiy [Thu, 15 Aug 2024 02:13:23 +0000 (22:13 -0400)]
Start of Wordle

23 months agoMerge branch 'next'
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 04:03:08 +0000 (01:03 -0300)]
Merge branch 'next'

This merge adds numerous individually small fixes and improvements
which amount to a sizeable set of features.

 - New hourly chime tunes added
 - Old hourly chime tunes improved
 - Display of characters on the stock LCD improved
 - Documentation improved
 - Simulator improved
 - Leap year handling improved
 - Months and their days sanity checked and fixed
 - More compile time configurable defaults added
 - Excessively exact time checks relaxed
 - Clock face indicators matched to original watch
 - Hardware interface issue fixed

The most significant new feature however is software debouncing.
The sensor watch now properly handles hardware switch bouncing,
making the button inputs much more precise at the cost of a small amount
of latency, greatly improving usability. Any watch faces which require
holding down buttons as part of their user interface, the pulsometer
for example, should see huge improvements in their usability.

 * 9c093f9 Merge PR #387 - configurable default birthdate/location
 * 879c48c Merge PR #417 - improve 24h only mode
 * db4097b Merge PR #426 - add temperature input to simulator
 * dea0566 Merge PR #428 - fix issues in sunrise/sunset
 * c8ca0d3 Merge PR #431 - fix wrong number of days in month
 * 95ca374 Merge PR #433 - fix clock face indicators
 * 663cd72 Merge PR #434 - fix leap years
 * a715265 Merge PR #437 - debouncing logic
 * c741332 Merge PR #439 - fix scheduled task misses
 * 657ff72 Merge PR #440 - fix countdown face issues
 * c8a87d3 Merge PR #441 - update documentation
 * dd04443 Merge PR #443 - improved t and y character display
 * 42dc151 Merge PR #447 - improve kim possible chime
 * fa0cdef Merge PR #450 - sync after enabling RTC
 * a67076f Merge PR #458 - add layla tune
 * 23c422b Merge PR #459 - add power rangers tune
 * a2e5417 Merge PR #461 - improve t/y special case docs

Tested-on-hardware-by: Alex Maestas <git@se30.xyz>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
Tested-on-hardware-by: Wesley Ellis <tahnok@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/460

23 months agoMerge PR #458 - add layla tune
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 03:49:20 +0000 (00:49 -0300)]
Merge PR #458 - add layla tune

Awesome lick from Eric Clapton - Layla.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/458

23 months agoMerge PR #459 - add power rangers tune
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 03:42:33 +0000 (00:42 -0300)]
Merge PR #459 - add power rangers tune

The power lies on their side.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/459

23 months agoMerge PR #461 - improve t/y special case docs
Matheus Afonso Martins Moreira [Tue, 3 Sep 2024 03:28:25 +0000 (00:28 -0300)]
Merge PR #461 - improve t/y special case docs

Fix a typo and make the documentation clearer.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/461

23 months agoadd power rangers tune
Metehan [Sun, 1 Sep 2024 23:11:27 +0000 (02:11 +0300)]
add power rangers tune

23 months agoupdate layla tune
Metehan [Sun, 1 Sep 2024 21:03:21 +0000 (00:03 +0300)]
update layla tune

23 months agoadd layla tune
Metehan [Sat, 31 Aug 2024 23:33:05 +0000 (02:33 +0300)]
add layla tune

23 months agoMerge PR #450 - sync after enabling RTC
Matheus Afonso Martins Moreira [Fri, 30 Aug 2024 19:20:41 +0000 (16:20 -0300)]
Merge PR #450 - sync after enabling RTC

According to the data sheet, writing to a Control A register's ENABLE
bit will trigger write synchronization and set SYNCBUSY's ENABLE bit
which will be automatically cleared by the hardware once the write
operation is complete.

It is necessary to wait until SYNCBUSY's ENABLE bit is clear.
Reading synchronized registers before that returns previous values.
Writing synchronized registers before that drops the write and generates
an error value in another register.

The data sheet recommends polling the ENABLE bit in this situation.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/450
References: SAM L22 Family Data Sheet §§ 14.3.2, 14.3.3, 14.3.4, 14.3.5

23 months agoMerge PR #417 - improve 24h only mode
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 02:17:59 +0000 (23:17 -0300)]
Merge PR #417 - improve 24h only mode

Enhances 24 hour only mode by setting defaults properly
and skipping past the 12/24 hour settings page in the
preferences watch face.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/417

23 months agoMerge PR #426 - add temperature input to simulator
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 02:08:36 +0000 (23:08 -0300)]
Merge PR #426 - add temperature input to simulator

This patch enhances the Sensor Watch simulator with a temperature input
allowing users to simulate and test the temperature sensor.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/426

23 months agoMerge PR #428 - fix issues in sunrise/sunset
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 02:01:48 +0000 (23:01 -0300)]
Merge PR #428 - fix issues in sunrise/sunset

Takes zero into account, allowing the sunrise/sunset watch face
to work with no presets defined.

Also resolves a warning during compilation of the sunrise/sunset face.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/428

23 months agoMerge PR #434 - fix leap years
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 01:46:49 +0000 (22:46 -0300)]
Merge PR #434 - fix leap years

Improves handling of months in the Sensor Watch
by computing whether the given year is a leap year.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/434

23 months agoMerge PR #431 - fix wrong number of days in month
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 01:55:43 +0000 (22:55 -0300)]
Merge PR #431 - fix wrong number of days in month

July has 31 days and but was set to 30 days in the Sensor Watch.
This patch fixes the discrepancy.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/431

23 months agoMerge PR #433 - fix clock face indicators
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 01:39:12 +0000 (22:39 -0300)]
Merge PR #433 - fix clock face indicators

I misinterpreted the documentation and swapped the alarm and time signal
indicators in the clock face. This patch brings it back in sync with
the original watch's behavior as described in the manual.

Reported-by: 814d3 (GitHub)
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/433
References: https://github.com/joeycastillo/Sensor-Watch/pull/380
References: https://github.com/joeycastillo/Sensor-Watch/issues/132

23 months agoMerge PR #440 - fix countdown face issues
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 01:31:47 +0000 (22:31 -0300)]
Merge PR #440 - fix countdown face issues

Avoid potential underflow when evaluating x - y with y > x.
Evaluate it only when y <= x instead.

Avoid clearing indicators in background task
since another watch face is likely active.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/440

23 months agoMerge PR #447 - improve kim possible chime
Matheus Afonso Martins Moreira [Thu, 29 Aug 2024 01:20:10 +0000 (22:20 -0300)]
Merge PR #447 - improve kim possible chime

The current one is slightly off compared to the original tune.

Original: https://www.youtube.com/watch?v=_3nfrGdVcv0
Before: https://onlinesequencer.net/4159215
After: https://onlinesequencer.net/4160385

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/447

23 months agoMerge PR #437 - debouncing logic
Matheus Afonso Martins Moreira [Wed, 28 Aug 2024 13:30:44 +0000 (10:30 -0300)]
Merge PR #437 - debouncing logic

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

23 months agoMerge PR #387 - configurable default birthdate/location
Matheus Moreira [Mon, 26 Aug 2024 12:24:12 +0000 (09:24 -0300)]
Merge PR #387 - configurable default birthdate/location

Adds the ability to configure at compilation time
the movement's default birth date and location.

Tested-by: madhogs <madhogs@protonmail.com>
Tested-by: Niehztog <niehztog@gmail.com>
Tested-on-hardware-by: madhogs <madhogs@protonmail.com>
Tested-on-hardware-by: Niehztog <niehztog@gmail.com>
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/387

23 months agoMerge PR #439 - fix scheduled task misses
Matheus Moreira [Mon, 26 Aug 2024 12:14:29 +0000 (09:14 -0300)]
Merge PR #439 - fix scheduled task misses

The movement was checking for scheduled tasks
by comparing for equality their scheduled times to
the current time. However, it is possible that the time
has moved past the scheduled time by the time the
function executes, leading to scheduled tasks not
being executed and therefore to missed deadlines.

Changing it to `<=` fixes the problem by taking that
possibility into account.

Helped-by: Wesley Ellis <tahnok@gmail.com>
Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/439