Skip to content
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

remove HackRF anti-freeze timeouts in places that do not require them #890

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)