aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-01-03 12:32:35 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2023-01-03 12:32:35 +0100
commit96a76022eb048ca365d84a6444eb1825a154d588 (patch)
treeafc4f52f32564e9a36fa0ecedc23ba58aab53720
parent38ef609475a25143640bf8d2d1df5ad6a68b7403 (diff)
downloadfl2k_ampliphase-96a76022eb048ca365d84a6444eb1825a154d588.tar.gz
fl2k_ampliphase-96a76022eb048ca365d84a6444eb1825a154d588.tar.bz2
fl2k_ampliphase-96a76022eb048ca365d84a6444eb1825a154d588.zip
Fix trig table init
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 1c6f520..cafc4f3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -88,8 +88,8 @@ impl DDS {
let incr = 1.0f32 / TRIG_TABLE_LEN as f32;
for i in 0..TRIG_TABLE_LEN {
- let i = f32::cos(incr * i as f32 * 2.0 * PI) * 255.0;
- let q = f32::sin(incr * i as f32 * 2.0 * PI) * 255.0;
+ let i = f32::cos(incr * i as f32 * 2.0 * PI) * 127.0;
+ let q = f32::sin(incr * i as f32 * 2.0 * PI) * 127.0;
match waveform {
Waveform::Sine => {