summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index b3c2a05..d068e57 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -51,9 +51,10 @@ impl RtlSdr {
handle.init_baseband();
handle.set_i2c_repeater(true);
- let tuner = match self.search_tuner(&handle) {
+ let tuner: Box<dyn Tuner> = match self.search_tuner(&handle) {
Some(tuner) => match tuner {
- "r820t" => Some(r820t::R820T::new(&handle)),
+ r820t::TUNER_ID => Box::new(r820t::R820T::new(&handle)),
+ fc0013::TUNER_ID => Box::new(fc0013::FC0013::new(&handle)),
_ => {
println!("No valid tuner found");
return;
@@ -65,7 +66,6 @@ impl RtlSdr {
}
};
- let tuner = tuner.unwrap();
tuner.init();
// handle.deinit_baseband();