Skip to content

Commit fd67f20

Browse files
committed
Update interface for updateBandwidth and bump UHDBindings version
1 parent 9f3aea5 commit fd67f20

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AbstractSDRs"
22
uuid = "0bdde9fc-719a-4dc7-8589-49ca6634fa6b"
33
authors = ["Robin Gerzaguet <robin.gerzaguet@irisa.fr>"]
4-
version = "0.5.1"
4+
version = "0.6.0"
55

66
[deps]
77
AdalmPluto = "af34ca7c-e544-47d5-a6fe-72495f08728e"
@@ -20,7 +20,7 @@ librtlsdr_jll = "d1c10d9e-0af6-511b-a44d-62fc8e59b084"
2020
AdalmPluto = "0.3"
2121
CEnum = "0.4"
2222
Reexport = "0.2,1.0"
23-
UHDBindings = "0.4"
23+
UHDBindings = "0.5"
2424
ZMQ = "1.2"
2525
julia = "1.6"
2626
librtlsdr_jll = "0.6"

src/AbstractSDRs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export scan
5252
include("Mutators.jl")
5353
export updateCarrierFreq!
5454
export updateSamplingRate!
55+
export updateBandwidth!
5556
export updateGain!
5657
export updateGainMode!
5758

@@ -177,7 +178,7 @@ function openSDR(name::Symbol,tul...;key...)
177178
suppKwargs = [:agc_mode;:tuner_gain_mode]
178179
radio = openRTLSDR(tul...;parseKeyword(key,suppKwargs)...);
179180
elseif name == :bladerf
180-
suppKwargs = [] #FIXME specific bladerf call
181+
suppKwargs = [:agc_mode] #FIXME specific bladerf call
181182
radio = openBladeRF(tul...;parseKeyword(key,suppKwargs)...);
182183
elseif name == :pluto
183184
# --- List of supported keywords

src/Mutators.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,24 @@ function updateGain!(obj::PlutoSDR,tul...)
7676
return getGain(obj)
7777
end
7878

79+
"""
80+
Update RF bandwidth (if different from the one piloted by updateSamplingRate).
81+
Valid for AdalmPluto and BladeRF
82+
# --- Syntax
83+
updateBandwidth!(radio,gain)
84+
# --- Input parameters
85+
- radio : SDR device
86+
- RF band : New band
87+
# --- Output parameters
88+
- gain : New band
89+
"""
90+
updateBandwidth!(obj::SDROverNetwork,tul...) = getSamplingRate(obj)
91+
updateBandwidth!(obj::UHDBinding,tul...) = getSamplingRate(obj)
92+
updateBandwidth!(obj::RadioSim,tul...) = getSamplingRate(obj)
93+
updateBandwidth!(obj::RTLSDRBinding,tul...) = getSamplingRate(obj)
94+
updateBandwidth!(obj::BladeRFBinding,tul...) =BladeRFBindings.updateBandwidth!(obj,tul...)
95+
updateBandwidth!(obj::PlutoSDR,tul...) = AdalmPluto.updateBandwidth!(obj,tul...)
96+
7997

8098
"""
8199
Define Gain policy for the SDR radio. Only supported on AdalmPluto

0 commit comments

Comments
 (0)