Closed awelkie closed 9 years ago
Ah, I figured it out. It was a missing call to clear_buffer
:
fn main() {
let dev = open_device();
set_frequency(dev, 101_000_000);
set_sample_rate(dev, 1_000_000);
set_gain_auto(dev);
clear_buffer(dev);
let source = read_async(dev, 1024);
loop {
let data = source.recv();
println!("got data");
}
}
Thanks! I welcome any additional bug reports / questions / comments. I'll be sure to add sample code showing the correct use of read_async.
After a call to read_async, the callback doesn't seem to be getting called. Here's my main function:
I'm not getting any of the "got data" printouts. I know my rtlsdr is working, because the
rtl_fm
utility is working. This is on arch linux x86_64, with rustc versionrustc 0.13.0-nightly (99d6956c3 2014-12-18 20:32:07 +0000)
, with the Rafael Micro R820T tuner. Any idea what's wrong?