Skip to content

Commit

Permalink
Fixes for tune AGC AD9361 (#164)
Browse files Browse the repository at this point in the history
* Use `filesep` to use correct separator for current platform

* Set 'FollowLinks' on when finding system under masks

* Set 'Attackmode' with MaskParameter name 'agc'
  • Loading branch information
HavingaThijs authored Jan 21, 2024
1 parent cbcde79 commit c1df799
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions trx_examples/targeting/tuneAGC-ad9361/AD9361TRx.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
warning('off', 'MATLAB:MKDIR:DirectoryExists');
mkdir(obj.folder_name);
obj.sig_filename = char('testWaveform_'+regexprep(string(datetime),'[:-\s]','_')+'.bb');
obj.testwaveform_fileloc = [pwd '\' obj.folder_name '\' obj.sig_filename];
obj.testwaveform_fileloc = [pwd filesep obj.folder_name filesep obj.sig_filename];
obj.rxNonHT_2x = resample(obj.rxWaveform, M, N);
bbw = comm.BasebandFileWriter(obj.testwaveform_fileloc,(M/N)*fs,fc);
bbw.Metadata = struct('Date',date);
Expand Down Expand Up @@ -265,17 +265,17 @@ function disable_signal_logging(obj)
elseif strcmpi(str, 'Attackmode')
if (AGC_MODE ~= 3)
if (AGC_MODE == 0)
in = in.setBlockParameter(rx_top_level{ii}, 'Attackmode', 'Manual');
in = in.setBlockParameter(rx_top_level{ii}, 'agc', 'Manual');
elseif (AGC_MODE == 1)
in = in.setBlockParameter(rx_top_level{ii}, 'Attackmode', 'Fast');
in = in.setBlockParameter(rx_top_level{ii}, 'agc', 'Fast');
elseif (AGC_MODE == 2)
in = in.setBlockParameter(rx_top_level{ii}, 'Attackmode', 'Slow');
in = in.setBlockParameter(rx_top_level{ii}, 'agc', 'Slow');
end
end
end
end

rx_under_mask = find_system(obj.rx_block, 'LookUnderMasks', 'on', 'SearchDepth', 1);
rx_under_mask = find_system(obj.rx_block, 'LookUnderMasks', 'on', 'SearchDepth', 1, 'FollowLinks', 'on');

for ii = 1:length(rx_under_mask)
logged_block_path = strsplit(rx_under_mask{ii}, '/');
Expand Down

0 comments on commit c1df799

Please sign in to comment.