Skip to content

Commit

Permalink
remove anti-freeze timeouts in places that do not require them (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilswint authored Feb 21, 2022
1 parent 38d1355 commit 03db43f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/urh/dev/native/lib/hackrf.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ cpdef int stop_tx_mode():
return chackrf.hackrf_stop_tx(_c_device)

cpdef int set_freq(freq_hz):
time.sleep(TIMEOUT)
return chackrf.hackrf_set_freq(_c_device, freq_hz)

cpdef is_streaming():
Expand All @@ -125,7 +124,6 @@ cpdef is_streaming():
return False

cpdef int set_amp_enable(value):
time.sleep(TIMEOUT)
cdef uint8_t val = 1 if value else 0
return chackrf.hackrf_set_amp_enable(_c_device, val)

Expand All @@ -135,28 +133,22 @@ cpdef int set_rf_gain(value):

cpdef int set_if_rx_gain(value):
""" Sets the LNA gain, in 8Db steps, maximum value of 40 """
time.sleep(TIMEOUT)
return chackrf.hackrf_set_lna_gain(_c_device, value)

cpdef int set_if_tx_gain(value):
""" Sets the txvga gain, in 1db steps, maximum value of 47 """
time.sleep(TIMEOUT)
return chackrf.hackrf_set_txvga_gain(_c_device, value)

cpdef int set_baseband_gain(value):
""" Sets the vga gain, in 2db steps, maximum value of 62 """
time.sleep(TIMEOUT)
return chackrf.hackrf_set_vga_gain(_c_device, value)

cpdef int set_sample_rate(sample_rate):
time.sleep(TIMEOUT)
return chackrf.hackrf_set_sample_rate(_c_device, sample_rate)

cpdef int set_bias_tee(on_or_off):
time.sleep(TIMEOUT)
cdef uint8_t bias_tee = 1 if on_or_off else 0
return chackrf.hackrf_set_antenna_enable(_c_device, bias_tee)

cpdef int set_baseband_filter_bandwidth(bandwidth_hz):
time.sleep(TIMEOUT)
return chackrf.hackrf_set_baseband_filter_bandwidth(_c_device, bandwidth_hz)

0 comments on commit 03db43f

Please sign in to comment.