Releases: TheAngryRaven/DovesLapTimer
v4.1.0
v4.1.0 — Testing, docs, and a cleaner core
This is the release where DovesLapTimer grew up. No new timing features and zero breaking changes — every sketch written against v4.0 keeps working untouched — but the library is now genuinely trustworthy: it has a real test suite, an API docs site, less duplicated code, and documentation that tells the truth about what it does.
Highlights
- 🧪 66 automated tests across three layers, running in CI on every push
- 📊 Real-track regression testing — actual Orlando Kart Center GPS recordings, lap times pinned to ±10ms
- 📖 API documentation site at https://theangryraven.github.io/DovesLapTimer/
- 🧹 Cleaner core — the crossing-detection logic is no longer copy-pasted three ways
- 🏎️ The sector timing example actually runs now — no GPS hardware required
🧪 Testing (the big one)
The library is now validated in three layers, all enforced by GitHub Actions:
- Structural —
arduino-lintfor Library Manager compliance, plus every example compiles across Arduino Mega, Uno, ESP32, and XIAO nRF52840. - Module unit tests — 43 host-native tests (
g++, no hardware) covering the geo math, direction detection, the course-detector state machine, and a full synthetic-track integration pass. - NMEA replay regression — 23 tests replay four real GPS recordings through the lap timer and assert lap times match known-good values within ±10ms, with a ±200ms sanity check against MyLaps magnetic-loop ground truth.
Run them yourself: cd test && make run.
📖 Documentation
- New API docs site built with Doxygen + a modern theme (dark mode, search, code-copy buttons), auto-deployed on every release.
- README rewrite — a copy-paste Quickstart now sits in the first 50 lines, plus a Testing & validation section.
- Honest Catmull-Rom docs —
forceCatmullRomInterpolation()only affects the reported crossing-point coordinates; lap times are always linearly interpolated and identical between modes. This is now documented and enforced by tests, instead of being implied otherwise.
🧹 Code quality
checkStartFinishandcheckSectorLinewere ~80% duplicated. They now share a single_detectLineCrossingstate machine — ~60 fewer lines, one source of truth, proven behavior-identical by the test suite.
🏎️ Examples
sector_timing_examplenow drives the timer through a synthetic 100m × 100m loop, so you can watch sector splits and optimal-lap calculation accumulate on Serial without any GPS hardware. A documented 3-step swap-in path replaces the synthetic feed with your real module.
🐛 Fixes
- Direction detection no longer mis-locks to reverse when the racing line misses a sector or a GPS glitch fabricates a phantom crossing — it now requires both sector lines per lap and decides from their timing order.
- Course detection no longer burns through all rejection attempts in a few GPS frames before falling back to "Lap Anything."
- Doc-comment parameter-name typos corrected.
Project health
CONTRIBUTING.md,SECURITY.md,CODE_OF_CONDUCT.md, issue forms, and a PR template.CHANGELOG.mdnow tracks every release.
Upgrade notes
None — drop-in compatible with v4.0. Update via the Arduino Library Manager as usual.
What's Changed
- little review with opus by @TheAngryRaven in #13
- ci: add arduino-lint + compile-examples GitHub Actions (layer 1) by @TheAngryRaven in #15
- fix three course detection bugs ported from the webapp by @TheAngryRaven in #14
- ci: trim Mega to smoke test, switch XIAO to Adafruit-based nrf52 BSP by @TheAngryRaven in #16
- examples: drive sector_timing with a synthetic CCW square track by @TheAngryRaven in #17
- ci: layer-2 host-native unit tests (43 tests across 4 suites) by @TheAngryRaven in #18
- ci: layer-3 NMEA replay regression tests (21 tests, 4 real-track fixtures) by @TheAngryRaven in #19
- refactor: extract _detectLineCrossing helper, kill ~60 lines of duplication by @TheAngryRaven in #20
- catmull-rom: characterize lat/lng-only scope, tighten replay tolerances 50ms→10ms by @TheAngryRaven in #21
- docs: add Quickstart + Testing & validation sections to README by @TheAngryRaven in #22
- docs: Doxygen + GitHub Pages with doxygen-awesome-css theme by @TheAngryRaven in #23
- release: v4.1.0 — bump library.properties + add CHANGELOG.md by @TheAngryRaven in #24
Full Changelog: v4.0.0...v4.1.0
V4 now with automatic course detection
Big update bringing automatic course detection to the library as long as you know the current length of the courses you drive!
Mission Accomplished
Mission Accomplished
This has been three years in the making and i think its honestly ready to be deemed "released".
Thousands of laps, multiple endurance races, single sessions with 500+ laps and it works unbelievably well.
- Current lap
- Time
- Distance
- Number
- Last lap
- Time
- Distance
- Best lap
- Time
- Distance
- Number
- Pace difference against current and best lap
- Sector timing (optional)
- 3 sectors per lap (Sector 1, 2, and 3)
- Best time for each sector
- Current lap sector times
- Optimal lap time (sum of best sectors)
- Track which lap achieved best sector times
Semi Stable Beta
First "beta release" that I feel somewhat confident in.
Notes
- Requires a lot of memory and computing power
- Please use the reccomended NRF52840
- If you're going to use an arduino at least use a Mega
- Current CatmulRom interpolation method is wonky, please default to linear
- library is currently defaulting to linear
- Has survived 2 track days so far with point for point readings against an alfano race computer.
- Mote testing to come!