Commit Graph
1959 Commits
Author SHA1 Message Date
huesoandhueso 58dd581b97 Fixed buffer overflows in sunrise_sunset_face 2026-08-04 20:30:08 -03:00
volovedandGitHub 9cea7290f4 Merge pull request #225 from rieck/hydration-face
Add hydration watch face
2026-07-28 09:11:09 -04:00
volovedandGitHub c25e5d4588 Merge branch 'main' into hydration-face 2026-07-28 09:09:31 -04:00
volovedandGitHub 4fa4a3fb4e Merge pull request #223 from cmcqueen/indicator-comments
Fix comments for bell and signal indicators
2026-07-28 09:07:57 -04:00
volovedandGitHub b5f8007756 Merge pull request #224 from rieck/deadline_face_fix
Fix of two bugs in deadline face
2026-07-28 09:07:46 -04:00
volovedandGitHub 288602c69f Merge pull request #226 from rieck/lis2dw_monitor_face_fix
Fix two bugs in lis2dw_monitor_face
2026-07-28 09:06:46 -04:00
volovedandGitHub b78eaf80b1 Merge pull request #227 from rieck/world_clock2_face
Add world clock2 watch face
2026-07-28 09:06:08 -04:00
Konrad Rieck 0557684ec1 Return to clock mode on inactivity timeout in settings
_settings_loop() never handled EVENT_TIMEOUT, so leaving the watch
face parked in settings mode (4Hz tick, blinking abbreviation) with
no button presses meant it stayed there indefinitely instead of
returning to the clock display like every other face's settings mode
does on timeout.

Factor the existing EVENT_MODE_BUTTON_UP transition logic into
_exit_settings_mode() and reuse it for EVENT_TIMEOUT.
2026-07-27 22:34:04 +02:00
Konrad Rieck cd18c95779 Port of world_clock2 to second movement.
Improvements:

- The name of the time zone is displayed for a brief movement when cycling through the selected time zones.

- The face now comes with pre-selected zones to show-case its functionality: Seattle, New York, UTC, Shanghai, and Tokyo.
2026-07-27 22:33:06 +02:00
Konrad Rieck bf25776a66 Fix wrong format specifier for axis label
_monitor_display() used %C (wide character, expects wint_t) instead
of %c (plain char/int) to print the X/Y/Z axis label. Every other
single-character display in the codebase uses %c; on the embedded
build, without wide-char support in the C library, %C is not a
valid conversion for the char actually being passed.
2026-07-27 22:12:22 +02:00
Konrad Rieck c742e92e7f Fix memory leak in lis2dw_monitor_face settings array
state->settings was malloc'd in lis2dw_monitor_face_setup() outside
the guard that only runs on first allocation of the face's context.
setup() is called again every time the watch wakes from deep sleep
(movement.c's app_setup() re-runs watch_faces[i].setup() for every
face on wake), so each wake cycle allocated a new settings array and
abandoned the previous pointer with no matching free.

Since NUM_SETTINGS is a compile-time constant, make settings a
fixed-size array embedded directly in lis2dw_monitor_state_t instead
of a separately malloc'd pointer, so it's allocated exactly once
along with the rest of the state and never leaks.
2026-07-27 22:11:52 +02:00
Konrad Rieck 705e4be13a Hydration watch face
This watch face monitors daily hydration by tracking and logging water intake.

In tracking mode: Display current water intake and percentage
- Alarm button: +100ml (or configured glass size)
- Light button: -100ml (or configured glass size)
- Alarm long press: Display deviation from estimate
- Light long press: Switch to settings mode
- Alarm really long press: Switch to log mode

In settings mode: Configure glass size, daily goal, wake time, sleep time, alert interval
- Light button: Switch to next setting
- Alarm button: Advance current setting
- Alarm long press: Reset to default value
- Mode button: Switch to tracking mode

In log mode: Display log entries of water intake, date and deviation from goal
- Alarm button: Switch to next log entry
- Light button: Cycle through intake, date and deviation
- Mode button: Switch to tracking mode

Background tasks:
- Automatic reset at wake time
- Alert if intake below estimate at sleep time
- Alert at interval if intake below estimate, waking the watch if asleep
2026-07-27 21:47:04 +02:00
Konrad RieckandClaude Sonnet 5 eacb6de737 Deduplicate month-length table in deadline_face
_increment_date() kept its own copy of the days-per-month table
and leap-year check, duplicating _days_in_month() in the same
file. Two sources of truth is how the July day-count typo went
unnoticed. Call _days_in_month() directly instead, leaving one
table in the file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSucp94GA31sshe5AjvSzQ
2026-07-27 20:41:36 +02:00
Konrad RieckandClaude Sonnet 5 0b7ea662fe Fix day-increment overflow check in deadline_face settings
date_time.unit.day is a 5-bit bitfield (max 31). Incrementing 31
directly in the bitfield wrapped to 0 via truncation before the
day > days_in_month bounds check ever ran, so the overflow was
never caught. The result decoded as "day 0" of the current month,
i.e. the last day of the previous month, silently rolling the
displayed date backwards (e.g. Aug 31 -> Jul 31 -> Jun 30).

Compute the incremented day in a plain uint8_t local first, compare
it against the month length, and only then write the final value
into the bitfield.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSucp94GA31sshe5AjvSzQ
2026-07-27 20:40:21 +02:00
Konrad RieckandClaude Sonnet 5 8913758a24 Fix wrong July day count in deadline_face settings table
The local days_in_month table in _increment_date() listed July as
having 30 days instead of 31, diverging from the correct table in
_days_in_month(). This made July 31 unreachable when incrementing
the day field in settings mode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSucp94GA31sshe5AjvSzQ
2026-07-27 20:39:30 +02:00
Craig McQueen 4679a51b4c Fix comments for bell and signal indicators
* `WATCH_INDICATOR_SIGNAL` is for indicating alarm is on.
* `WATCH_INDICATOR_BELL` is for indicating hourly chime in on.
2026-07-16 18:22:37 +10:00
volovedandGitHub b2589bebcd Merge pull request #217 from voloved/fix/moon-is_southern_hemisphere
location.bit.latitude  needs to be recast as an int16_t
2026-06-06 17:44:46 -04:00
David Volovskiy adbd517694 location.bit.latitude needs to be recast as an int16_t 2026-06-06 17:39:16 -04:00
volovedandGitHub 68bfe1144d Merge pull request #201 from sarasopodo/fix/moon-phase-southern-hemisphere
fix: moon-phase display and quarter labels for southern hemisphere
2026-06-06 16:29:26 -04:00
David Volovskiy 1fc366b073 Only update the hemisphere if the load didn't fail 2026-06-06 16:23:21 -04:00
David Volovskiy 191b0c4ab2 Added southern_hemisphere to moon_phase_state_t 2026-06-06 16:19:54 -04:00
volovedandGitHub 851d9d91f0 Hemisphere uses filesystem 2026-06-06 14:01:12 -04:00
volovedandGitHub 576f4e0ec2 Merge pull request #209 from paul-ri/countdown-disable_double_tap
Countdown: Disable double tap
2026-06-05 07:51:21 -04:00
volovedandGitHub b6a85aca9d Merge pull request #210 from chadnorvell/flake-python3
flake.nix: Add python313
2026-06-05 07:44:38 -04:00
volovedandGitHub cd41e6fbd4 Merge pull request #214 from timdoug/fix-finetune-ppm-display
Fix ppm fractional display on finetune Frq page
2026-06-05 07:44:29 -04:00
volovedandGitHub 1ba5f97c2f Merge pull request #211 from Niehztog/fix_days_since_timezone_offset
days_since_face: Replace calls to watch_rtc_get_date_time() with movement_get_local_date_time() to make the face "timezone aware"
2026-06-05 07:42:52 -04:00
volovedandGitHub 907ec4969f Merge pull request #216 from voloved/settings-less-blinking
Settings display no longer clears every second as it shows a flicker on some watches
2026-06-05 07:40:27 -04:00
David Volovskiy f64fccd2af Settings display no longer clears every second as it shows a flicker on some watches 2026-05-31 07:56:42 -04:00
Tim Douglas b178390e75 Fix ppm fractional display on finetune Frq page
The Frq page used remainderf to extract the fractional part of the
correction value, but remainderf rounds to the nearest integer and
returns negative results when the fraction exceeds 0.5. This caused
values like 0.965 ppm to render as " 0-350" instead of " 09650".
Switch to fmodf, matching the DELtA page above.
2026-05-26 23:15:06 -04:00
Niehztog f898f49a7f days_since_face: Replace all three calls to watch_rtc_get_date_time() with movement_get_local_date_time() to make the face "timezone aware" 2026-05-14 13:05:45 +02:00
Chad Norvell 7e1b873798 flake.nix: Add python313
Python is needed to run uf2conv, so the final build step will fail
without it. Most folks will have a global Python to fall back to, but
this change fixes the build for those who don't, and makes the Nix
environment more complete.
2026-04-28 16:35:18 -07:00
Paul Riou 6a304cb1eb countdown:Disable double tap detection
With double tap enabled, one had to tap not too fast on
the watch to increment the minutes regularly. Otherwise,
some taps would be discarded.
This made using the countdown face without looking at the
screen for acknowledgement of taps impossible.
It was also impossible to increment minutes quickly, every second tap
would be discarded.
2026-04-26 15:09:45 +01:00
Paul Riou 32ce50e70e movement:Allow disabling double tap detection in movement_enable_tap_detection_if_available
We will want to disable it in the countdown face.
2026-04-26 15:08:57 +01:00
sarasopodo f25ac9c9d6 moon-phase: fix display and quarter labels for southern hemisphere 2026-04-22 02:41:04 -03:00
volovedandGitHub a8ea642d35 Merge pull request #194 from davidegirardi/fix-signal-advanced-timer
Fix timer setting bell indicator on other faces on loop
2026-04-16 12:23:06 -04:00
volovedandGitHub 6b334541af Merge pull request #207 from voloved/tide-cleanup
Warning Cleanups After Recent Merges
2026-04-16 11:19:41 -04:00
David Volovskiy ab4fcd951d Made enums on tide face follow other faces 2026-04-16 11:06:05 -04:00
David Volovskiy 08f8cb687e Fixed build warnings 2026-04-16 11:01:48 -04:00
atax1aandGitHub 84b133feee Merge pull request #198 from stephan242/timezone-fully-automatic
fix(documentation): Time Zones now DST aware
2026-04-08 04:59:06 +00:00
atax1aandGitHub 25e791c302 Merge pull request #113 from mkende/countdown_indicator
Repeating countdown: use the looped arrows indicator instead of the bell one on the custom LCD
2026-04-08 04:50:29 +00:00
atax1aandGitHub 0b57376983 Merge pull request #176 from eiriksm/patch-3
Indicate more stability in readme
2026-04-08 04:44:02 +00:00
Alex Maestas a5fcde118e Merge branches 'stephan242-inactivity-countdown-when-le-never' and 'stephan242-off-by-one' 2026-04-08 04:42:48 +00:00
Stephan 546097dc94 fix: Handle inactivity timeout better in case LE is Never 2026-04-04 23:38:44 +01:00
Stephan c1620e854a fix(documentation): Time Zones now DST aware 2026-04-04 22:48:43 +01:00
Stephan e0a429aabe fix(settings_face): Off by one if Low Energy Mode forbidden 2026-04-04 22:29:00 +01:00
atax1aandGitHub 5fa9b7bd24 Merge pull request #196 from stephan242/sun-before-DST-change
fix: sunrise/set before DST change
2026-04-04 19:22:58 +00:00
Stephan 8bd07b407c fix: sunrise/set before DST change
The Sunrise and Sunset timezone offset needs to be calculated for the day it's relevant to, since it might experience a timezone  change.
2026-04-04 19:27:35 +01:00
davidegirardi e0b425ca90 Fix setting bell indicator on other faces on loop 2026-04-04 19:14:00 +02:00
volovedandGitHub cb58dea276 Merge pull request #193 from davidegirardi/fix-buzzer-cb-start
Fix calling start callback
2026-04-04 10:35:48 -04:00
davidegirardi ba9f41f963 Fix calling start callback 2026-04-04 16:07:03 +02:00