Xerbo / LeanHRPT-Demod

An easy to use HRPT demodulator
GNU General Public License v3.0
58 stars 7 forks source link

Error on compiling (1) and problem on running not detecting the sdr device (2) #15

Closed microp11 closed 2 years ago

microp11 commented 2 years ago

(1) When running make I get this error:

paul@Latitude-E6540:~/repos/LeanHRPT-Demod/build$ make
[  4%] Automatic MOC and UIC for target LeanHRPT-Demod
[  4%] Built target LeanHRPT-Demod_autogen
Scanning dependencies of target LeanHRPT-Demod
[  9%] Building CXX object CMakeFiles/LeanHRPT-Demod.dir/src/mainwindow.cpp.o
/home/paul/repos/LeanHRPT-Demod/src/mainwindow.cpp: In member function ‘void MainWindow::on_startButton_clicked()’:
/home/paul/repos/LeanHRPT-Demod/src/mainwindow.cpp:254:31: error: ‘screen’ was not declared in this scope; did you mean ‘QScreen’?
  254 |         double refresh_rate = screen()->refreshRate();
      |                               ^~~~~~
      |                               QScreen
make[2]: *** [CMakeFiles/LeanHRPT-Demod.dir/build.make:258: CMakeFiles/LeanHRPT-Demod.dir/src/mainwindow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/LeanHRPT-Demod.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

I have temporarily fixed the problem by hard coding the refreshRate():

 //double refresh_rate = screen()->refreshRate();
 double refresh_rate = 50.0;

And then I was able to build and run.

(2)However when I run the app, I am getting these lines:

paul@Latitude-E6540:/usr/local/bin$ ./LeanHRPT-Demod 
QMetaObject::connectSlotsByName: No matching signal for on_source_textActivated(QString)
QMetaObject::connectSlotsByName: No matching signal for on_antenna_textActivated(QString)
QMetaObject::connectSlotsByName: No matching signal for on_device_textActivated(QString)

and when selecting SDR as source, the "Device" is empty: Screenshot from 2022-10-26 20-16-39 although the sdr exists:

paul@Latitude-E6540:/usr/local/bin$ SoapySDRUtil --find="driver=hackrf"
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Found device 0
  device = HackRF One
  driver = hackrf
  label = HackRF One #0 406464c823511b4b
  part_id = a000cb3c005f4f55
  serial = 0000000000000000406464c823511b55
  version = git-ef5b907

paul@Latitude-E6540:/usr/local/bin$ 

If I ran your compiled image, it works well and the sdr is being detected correctly.

Any idea what could be the problem for 1 and 2? Thanks.

microp11 commented 2 years ago

Nevermind issue (1) above, I saw that in the lrpt branch this was fixed by hard coding the value:

timer->start(1000.0f/30.0f);

So then just issue (2) remains. Any help would be appreciated, thanks.

Xerbo commented 2 years ago

Seems like you just have an old(er) version of Qt, as I do development on 5.15.2 these must of slipped passed my radar of being Qt >5.14

microp11 commented 2 years ago

Thanks, I will give these a try tonight and let you know.