Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock-in #177

Merged
merged 20 commits into from
Dec 5, 2020
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
b34c8bb
add github CI test workflow
matthuszagh Nov 18, 2020
9a83d56
add dsp/target to gitignore
matthuszagh Nov 22, 2020
85adc8b
add lockin module
matthuszagh Nov 22, 2020
8ae2000
add lock-in low-pass integration tests
matthuszagh Nov 22, 2020
8806feb
lockin_low_pass: compute magnitude noise analytically
matthuszagh Nov 24, 2020
3c4e83b
lockin: move fifo trait before use
matthuszagh Nov 25, 2020
da4430e
lockin: add documentation explaining timestamp decrement
matthuszagh Nov 25, 2020
4edda09
lockin: change demodulate to return result instead of option
matthuszagh Nov 25, 2020
9592bb7
lockin: change zip order in decimate for clarity
matthuszagh Nov 25, 2020
f259d6c
lockin: minor variable name changes
matthuszagh Nov 25, 2020
90ef9f1
lockin: borrow adc samples and timestamps as slices
matthuszagh Nov 28, 2020
785c98f
lockin: remove TIMESTAMP_BUFFER_SIZE constant
matthuszagh Nov 28, 2020
fcdfcb0
lockin: use single iir instance for both in-phase and quadrature signals
matthuszagh Nov 28, 2020
d1b7efa
dsp: replace in_phase and quadrature with Complex
matthuszagh Nov 29, 2020
260206e
dsp: implement Complex as type alias for tuple
matthuszagh Nov 29, 2020
277a5d2
dsp: move common test code to testing.rs file
matthuszagh Nov 29, 2020
0cca458
lockin: compute reference period from the closest 2 timestamps to the…
matthuszagh Nov 30, 2020
55e7f1f
dsp: fix small comment grammar error
matthuszagh Nov 30, 2020
1b02f55
CI: specify test location using --package dsp
matthuszagh Dec 4, 2020
43a760e
dsp testing: improve api for tolerance checking
matthuszagh Dec 4, 2020
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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,25 @@ jobs:
command: build
args: --release --features semihosting

test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
steps:
- uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --package dsp --target=x86_64-unknown-linux-gnu

# Tell bors about it
# https://github.com/rtic-rs/cortex-m-rtic/blob/8a4f9c6b8ae91bebeea0791680f89375a78bffc6/.github/workflows/build.yml#L566-L603
ci-success:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/dsp/target
.gdb_history
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dsp/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ authors = ["Robert Jördens <[email protected]>"]
edition = "2018"

[dependencies]
libm = "0.2.1"
serde = { version = "1.0", features = ["derive"], default-features = false }

[features]
Expand Down
5 changes: 5 additions & 0 deletions dsp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#![cfg_attr(not(test), no_std)]
#![cfg_attr(feature = "nightly", feature(asm, core_intrinsics))]

pub type Complex<T> = (T, T);
pub mod iir;
pub mod lockin;
pub mod pll;

#[cfg(test)]
mod testing;
Loading