aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-01-07 17:08:04 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2023-01-07 17:08:04 +0100
commitdd2390c7e7331a8dcdabcd16fbdc603a78609536 (patch)
treea446c66280db4745c902fdcafce4bff06caf3855
parent96a76022eb048ca365d84a6444eb1825a154d588 (diff)
downloadfl2k_ampliphase-dd2390c7e7331a8dcdabcd16fbdc603a78609536.tar.gz
fl2k_ampliphase-dd2390c7e7331a8dcdabcd16fbdc603a78609536.tar.bz2
fl2k_ampliphase-dd2390c7e7331a8dcdabcd16fbdc603a78609536.zip
swap fl2k start and set rate
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index cafc4f3..38a34d4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -380,11 +380,12 @@ fn main() {
match output {
Output::FL2K => {
let mut fl2k = fl2k::FL2K::open(device_index).expect("fl2k open");
- fl2k.start_tx().expect("fl2k start_tx");
fl2k.set_sample_rate(samp_rate).expect("set fl2k sample rate");
- eprintln!("FL2K sample ret set to {}", fl2k.get_sample_rate().unwrap());
+ fl2k.start_tx().expect("fl2k start_tx");
+
+ eprintln!("FL2K sample rate set to {}", fl2k.get_sample_rate().unwrap());
loop {
let Ok((i, q)) = iq_rx.recv() else { break };