Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c0104c0
Rust rewrite v1 skeleton: regulator-core DSP crate + ratatui TUI
borosf Nov 17, 2026
d10adad
Fix cpal capture: import Host/Device traits, handle sample formats, r…
borosf Nov 17, 2026
3b38538
Fix use-after-move of SupportedStreamConfig in audio capture
borosf Nov 17, 2026
5d93068
Fix u16 underflow panic in waveform rendering
borosf Nov 17, 2026
1ecf553
Partial results, robust amplitude estimator, sub-sample period, FFT c…
borosf Nov 17, 2026
4dfe74c
Fix peak_detector panic on degenerate search ranges (mic noise)
borosf Nov 17, 2026
8a3686e
Port tg's sound-card calibration; GUI controls; WAV analysis tool
borosf Nov 17, 2026
4afa6f0
analyze_wav: decode WAV/MP3/M4A via symphonia; mkwav example for roun…
borosf Nov 17, 2026
a90923b
Fix real-watch detection: port tg's high-pass filter and amplitude al…
borosf Nov 17, 2026
58a5d44
Tick-event trace (snowflake display) and early-exit calibration
borosf Nov 17, 2026
dd0446e
Redesign GUI as an instrument: vertical strip chart, single primary r…
borosf Nov 17, 2026
0d77fcf
Calibration feedback view, editable lift angle, chart export
borosf Nov 17, 2026
c6e2127
Reinvent calibration: passive clock-based sound-card rate estimation
borosf Nov 17, 2026
9a8a4af
ClockCal: detect NTP clock steps and restart the fit cleanly
borosf Nov 17, 2026
7001496
Fix trace: measure real tick arrivals; monotonic time base; live cal …
borosf Nov 17, 2026
ed5ab9c
Fix GUI freeze: no locks held across analysis, panel order, O(n) trac…
borosf Nov 17, 2026
8b2916c
Fix deadlock: worker re-locked the params mutex it already held
borosf Nov 17, 2026
d184d64
Demote clock calibration to informational; quartz is authoritative
borosf Nov 17, 2026
63df687
Faster calibration: 0.2 s/d gate, editable cal field, persisted settings
borosf Nov 17, 2026
147a07e
Horizontal trace, JPEG result sheet, project files (CI, release, READ…
borosf Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Something doesn't measure, display, or build correctly
title: ""
labels: bug
assignees: ""
---

**Environment**
- OS:
- build: `cargo run -p regulator-gui` (debug/release), audio feature on/off

**Watch / setup**
- beat rate (bph):
- lift angle:
- microphone type:

**What happened**

**What you expected**

**Recording**
If possible, attach a WAV recording of the watch — it makes DSP issues reproducible.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: [master, main]
pull_request:

jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build (with audio)
run: cargo build --all-targets
- name: Test
run: cargo test --workspace

build-headless:
name: Build without audio stack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --no-default-features
- run: cargo test --workspace --no-default-features
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
binaries:
name: Build binaries
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: regulator-gui-windows-x86_64.zip
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: regulator-gui-linux-x86_64.tar.gz
- os: macos-latest
target: aarch64-apple-darwin
artifact: regulator-gui-macos-aarch64.tar.gz
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }} -p regulator-gui
- name: Package
shell: bash
run: |
cd target/${{ matrix.target }}/release
if [[ "${{ matrix.os }}" == windows-latest ]]; then
7z a ../../../${{ matrix.artifact }} regulator-gui.exe
else
tar czf ../../../${{ matrix.artifact }} regulator-gui
fi
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}

- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.artifact }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.*
!.gitignore
!.github
!.travis.yml
!.valgrind.supp

Expand Down Expand Up @@ -53,3 +54,6 @@ Makefile.in
# build directories
/deb
/msi

# Rust
/target
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributing to regulator

Thanks for your interest in improving regulator!

## Getting started

```sh
git clone https://github.com/borosf/regulator.git
cd regulator
cargo test --workspace # everything should pass before you start
cargo run -p regulator-gui # demo mode, no hardware needed
```

## Ground rules

- **License**: contributions are accepted under GPLv2, the project's
license. By submitting a pull request you agree your work is licensed
accordingly.
- **Scope of the core**: `regulator-core` must stay free of I/O and
platform dependencies. Audio capture, files and UI belong in the
frontend crates.
- **Tests**: the DSP core is unit-tested against a synthetic watch
generator (`crates/regulator-core/src/signal.rs`). If you change the
analysis, add or adjust a synthetic-signal test that demonstrates the
behavior.
- **Style**: follow the existing code style; no new dependencies unless
they're clearly justified.

## Bug reports

Open an issue and include:

- your OS and how you built (release/debug, audio feature),
- the movement's beat rate and lift angle,
- what you expected vs. what happened,
- if possible, a recording of the watch (WAV preferred) — recordings make
DSP bugs reproducible.

## Pull requests

Keep PRs focused: one change per PR. Describe what changed and why, and
list the commands you ran to verify (`cargo test --workspace`,
`cargo build --no-default-features`).
Loading
Loading