summaryrefslogtreecommitdiff
path: root/src/tuners/fc0013.rs
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2021-04-17 15:49:04 +0300
committerYuval Adam <_@yuv.al>2021-04-17 15:49:04 +0300
commitac956ac7d3dd5b51bfa9fc467ffb68a4715f3478 (patch)
tree74b77e4055be4d5e75134050685287d254fbfeb7 /src/tuners/fc0013.rs
parent46439763077ce7b656e8fae257f9c2205f23c6e5 (diff)
Start refactoring out handle and implementing rtl_test
Diffstat (limited to 'src/tuners/fc0013.rs')
-rw-r--r--src/tuners/fc0013.rs25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/tuners/fc0013.rs b/src/tuners/fc0013.rs
index fed1289..14e7970 100644
--- a/src/tuners/fc0013.rs
+++ b/src/tuners/fc0013.rs
@@ -1,9 +1,9 @@
use super::{Tuner, TunerInfo};
use usb::RtlSdrDeviceHandle;
-pub struct FC0013<'a> {
+pub struct FC0013 {
pub device: TunerInfo,
- pub handle: &'a RtlSdrDeviceHandle,
+ // pub handle: &'a RtlSdrDeviceHandle,
}
pub const TUNER_ID: &str = "fc0013";
@@ -14,22 +14,23 @@ pub const TUNER_INFO: TunerInfo = TunerInfo {
i2c_addr: 0xc6,
check_addr: 0x00,
check_val: 0xa3,
+ // gains: vec![
+ // -99, -73, -65, -63, -60, -58, -54, 58, 61, 63, 65, 67, 68, 70, 71, 179, 181, 182, 184, 186,
+ // 188, 191, 197,
+ // ],
};
-impl<'a> FC0013<'a> {
- pub fn new(handle: &'a RtlSdrDeviceHandle) -> FC0013<'a> {
- let tuner = FC0013 {
- device: TUNER_INFO,
- handle: handle,
- };
- tuner.init();
+impl FC0013 {
+ pub fn new(handle: &RtlSdrDeviceHandle) -> FC0013 {
+ let tuner = FC0013 { device: TUNER_INFO };
+ tuner.init(handle);
tuner
}
}
-impl<'a> Tuner for FC0013<'a> {
- fn init(&self) {
- println!("Init {}", self.device.name);
+impl Tuner for FC0013 {
+ fn init(&self, _handle: &RtlSdrDeviceHandle) {
+ unimplemented!()
}
fn exit(&self) {