L'utilizzo di GNU Radio Companion 3.9.4.0.
La mia domanda è un "interfaccia grafica QT" Intervallo di blocco. Quando il Widget è impostata a "Contatore + dispositivo di Scorrimento" ottengo l'errore
TypeError: setRange(self, int, int): argument 2 has unexpected type 'float'
Il codice Python per questa condizione è,
self._rf_gain_win = RangeWidget(self._rf_gain_range, self.set_rf_gain, "RF Gain", "counter_slider", float, QtCore.Qt.Horizontal)
Con il Widget set di "Contatore" non c'è alcun errore. Ora quella stessa linea Pitone è,
self._rf_gain_win = RangeWidget(self._rf_gain_range, self.set_rf_gain, "RF Gain", "counter", float, QtCore.Qt.Horizontal)
Come posso utilizzare il desiderato slider?
= = =
Il messaggio di errore completo è:
File "C:\Users\User1\Documents\Records\Software Defined Radio - SDR\GNU Radio\Flowgraphs\HackADay Tutorials\Video 02\Simple_AM_Rx_01_temp.py", line 100, in __init__
self._rf_gain_win = RangeWidget(self._rf_gain_range, self.set_rf_gain, "RF Gain", "counter_slider", float, QtCore.Qt.Horizontal)
File "C:\Users\User1\miniforge3\envs\gnuradio\lib\site-packages\gnuradio\qtgui\range.py", line 121, in __init__
self.d_widget = self.CounterSlider(self, self.range, self.notifyChanged, rangeType, orientation)
File "C:\Users\User1\miniforge3\envs\gnuradio\lib\site-packages\gnuradio\qtgui\range.py", line 262, in __init__
self.slider = RangeWidget.Slider(parent, ranges, self.sliderChanged, rangeType, orientation)
File "C:\Users\User1\miniforge3\envs\gnuradio\lib\site-packages\gnuradio\qtgui\range.py", line 161, in __init__
self.setRange(0, ranges.nsteps - 1)
TypeError: setRange(self, int, int): argument 2 has unexpected type 'float'