Skip to content

Commit e241311

Browse files
committed
Speed up internal allocation for I and Q
1 parent 01a16eb commit e241311

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AdalmPluto"
22
uuid = "af34ca7c-e544-47d5-a6fe-72495f08728e"
33
authors = ["Pierre Dénès <pdenes@enssat.fr> and Robin Gerzaguet <robin.gerzaguet@irisa.fr>"]
4-
version = "0.3.2"
4+
version = "0.3.3"
55

66
[deps]
77
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

src/AdalmPluto.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,8 @@ function refillJuliaBufferRX(pluto::PlutoSDR)
931931
# find the appropriate types and their max values for normalization
932932
bytes_per_value = pluto.rx.buf.C_step ÷ 2;
933933
utype, type, utype_norm, type_norm = nbytesToType(bytes_per_value);
934-
935-
pluto.rx.buf.samples = reinterpret(Complex{type}, [pluto.rx.buf.i_raw_samples pluto.rx.buf.q_raw_samples]'[:]) / Float32(type_norm);
934+
#pluto.rx.buf.samples = reinterpret(Complex{type}, [pluto.rx.buf.i_raw_samples pluto.rx.buf.q_raw_samples]'[:]) / Float32(type_norm);
935+
pluto.rx.buf.samples =(reinterpret(type,(pluto.rx.buf.i_raw_samples)) + 1im*reinterpret(type,pluto.rx.buf.q_raw_samples)) ./ Float32(type_norm);
936936
pluto.rx.buf.nb_samples = (nbytes_i + nbytes_q) ÷ pluto.rx.buf.C_step;
937937

938938
return pluto.rx.buf.nb_samples;

0 commit comments

Comments
 (0)