Skip to content

errors compiling: ioctl not defined #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
korc opened this issue Aug 20, 2018 · 1 comment
Open

errors compiling: ioctl not defined #3

korc opened this issue Aug 20, 2018 · 1 comment

Comments

@korc
Copy link

korc commented Aug 20, 2018

Looks like this repository depends on some modifications to gr-osmosdr, which even latest Nuand's gr-osmosdr repo does not contain..
Commenting ioctl stuff out with patch included works, but it's very ugly.
Is there any reason to use this repo instead of upstream at all?

diff --git a/src/applications/gqrx/receiver.cpp b/src/applications/gqrx/receiver.cpp
index b79b44c..11f2b73 100644
--- a/src/applications/gqrx/receiver.cpp
+++ b/src/applications/gqrx/receiver.cpp
@@ -319,14 +319,14 @@ double receiver::set_input_rate(double rate)
 
     tb->lock();
     ssa_mode = false;
-    if (src->ioctl("ssa_support", (uint64_t)&max_sps)) {
-        if (rate > max_sps) {
-            ssa_mode = true;
-        }
-    }
+    // if (src->ioctl("ssa_support", (uint64_t)&max_sps)) {
+    //     if (rate > max_sps) {
+    //         ssa_mode = true;
+    //     }
+    // }
 
     if (ssa_mode) {
-        d_input_rate = src->ioctl("set_ssa_sample_rate", (uint64_t)rate);
+        // d_input_rate = src->ioctl("set_ssa_sample_rate", (uint64_t)rate);
 
         if (d_input_rate > 0 ) {
 //            d_input_rate = src->ioctl("get_ssa_config", &num_bin, &halfband);
@@ -335,7 +335,7 @@ double receiver::set_input_rate(double rate)
             iq_fft->set_sweeping_mode(true, num_bin, halfband);
         }
     } else {
-        d_input_rate = src->ioctl("set_ssa_sample_rate", (uint64_t)0);
+        // d_input_rate = src->ioctl("set_ssa_sample_rate", (uint64_t)0);
         iq_fft->set_sweeping_mode(false, 0, 0);
         d_input_rate = src->set_sample_rate(rate);
     }
@NathanFrench
Copy link

latest Nuand's gr-osmosdr repo does not contain..

Really? Hrmmph. The sweep hack seemed pretty useful to me. I'll have to look into that.

Is there any reason to use this repo instead of upstream at all?

with the sweep hack, I'd say yes - burdening upstream with an #ifdef for osmosdr modifications just for blade would probably be frowned on. But without it, I don't see why not. It's already there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants