Merge #202
202: Fix/rj misc r=jordens a=jordens Co-authored-by: Robert Jördens <rj@quartiq.de>
This commit is contained in:
commit
1425608647
|
@ -77,10 +77,11 @@ jobs:
|
||||||
command: objcopy
|
command: objcopy
|
||||||
args: --release --verbose -- -O binary stabilizer-release.bin
|
args: --release --verbose -- -O binary stabilizer-release.bin
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: ${{ matrix.toolchain == 'stable' }}
|
||||||
with:
|
with:
|
||||||
name: stabilizer_${{ github.sha }}_rust-${{ matrix.toolchain }}
|
name: stabilizer_${{ github.sha }}
|
||||||
path: |
|
path: |
|
||||||
target/*/*/stabilizer
|
target/*/release/stabilizer
|
||||||
stabilizer-release.bin
|
stabilizer-release.bin
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
@ -106,10 +107,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
command: bench
|
command: bench
|
||||||
args: --package dsp --target=x86_64-unknown-linux-gnu
|
args: --package dsp --target=x86_64-unknown-linux-gnu
|
||||||
- uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: stabilizer_${{ github.sha }}_criterion
|
|
||||||
path: dsp/target/criterion
|
|
||||||
|
|
||||||
# Tell bors about it
|
# Tell bors about it
|
||||||
# https://github.com/rtic-rs/cortex-m-rtic/blob/8a4f9c6b8ae91bebeea0791680f89375a78bffc6/.github/workflows/build.yml#L566-L603
|
# https://github.com/rtic-rs/cortex-m-rtic/blob/8a4f9c6b8ae91bebeea0791680f89375a78bffc6/.github/workflows/build.yml#L566-L603
|
||||||
|
|
|
@ -86,15 +86,16 @@ mod tests {
|
||||||
let mut sum: Complex<f64> = (0., 0.);
|
let mut sum: Complex<f64> = (0., 0.);
|
||||||
let mut demod: Complex<f64> = (0., 0.);
|
let mut demod: Complex<f64> = (0., 0.);
|
||||||
|
|
||||||
// use std::{fs::File, io::prelude::*, path::Path};
|
// use std::{fs::File, io::{BufWriter, prelude::*}, path::Path};
|
||||||
// let mut file = File::create(Path::new("data.csv")).unwrap();
|
// let mut file = BufWriter::new(File::create(Path::new("data.bin")).unwrap());
|
||||||
|
|
||||||
const PHASE_DEPTH: usize = 20;
|
const PHASE_DEPTH: usize = 20;
|
||||||
|
|
||||||
for phase in 0..(1 << PHASE_DEPTH) {
|
for phase in 0..(1 << PHASE_DEPTH) {
|
||||||
let phase = (phase << (32 - PHASE_DEPTH)) as i32;
|
let phase = (phase << (32 - PHASE_DEPTH)) as i32;
|
||||||
let have = cossin(phase);
|
let have = cossin(phase);
|
||||||
// writeln!(file, " {},{}", have.0, have.1).unwrap();
|
// file.write(&have.0.to_le_bytes()).unwrap();
|
||||||
|
// file.write(&have.1.to_le_bytes()).unwrap();
|
||||||
|
|
||||||
let have = (have.0 as f64 / AMPLITUDE, have.1 as f64 / AMPLITUDE);
|
let have = (have.0 as f64 / AMPLITUDE, have.1 as f64 / AMPLITUDE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue