_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
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
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
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.
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.
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.