Skip to content

Commit

Permalink
FIX: Undefined function estFrequencyMax
Browse files Browse the repository at this point in the history
Signed-off-by: Julia Pineda <[email protected]>
  • Loading branch information
jpineda3 committed Oct 3, 2023
1 parent 643d4fb commit 53fc814
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions test/AD7768Tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

properties(TestParameter)
% start frequency. stop frequency, step, tolerance, repeats
signal_test = {{1000,100000,2500,0.015,1}};
signal_test = {{1000,100000,2500,0.025,10}};
sample_rate = {'256000', '128000', '64000', ...
'32000', '16000', '8000', '4000', ...
'2000', '1000'};
Expand Down Expand Up @@ -41,7 +41,7 @@ function testAD7768Smoke(testCase)
testCase.assertTrue(sum(abs(double(data)))>0);
end

function testAD7768_Signal(testCase,signal_test)
function testAD7768Signal(testCase,signal_test)
% Signal source setup
m2k_class = instr_m2k();
m2k = m2k_class.connect(getenv('M2K_URI'), false);
Expand All @@ -66,9 +66,8 @@ function testAD7768_Signal(testCase,signal_test)
data = adc();
end
for ch = adc.EnabledChannels
%FIXME: estFrequencyMax returns 'MATLAB:UndefinedFunction'
freqEst = estFrequencyMax(double(data(ch)),str2double(adc.SampleRate));
testCase.assertTrue(sum(abs(double(data(ch))))>0);
freqEst = testCase.estFrequencyMax(data(:,ch),str2double(adc.SampleRate));
testCase.assertTrue(sum(abs(double(data(:,ch))))>0);
testCase.verifyEqual(freqEst,frequency,'RelTol',tol,...
'Frequency of signal unexpected')
end
Expand Down
2 changes: 1 addition & 1 deletion test/AD7768_1Tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function testAD7768_1Signal(testCase,signal_test)
for k = 1:5
data = adc();
end
freqEst = estFrequencyMax(data,str2double(adc.SampleRate));
freqEst = testCase.estFrequencyMax(data,str2double(adc.SampleRate));
testCase.assertTrue(sum(abs(double(data)))>0);
testCase.verifyEqual(freqEst,frequency,'RelTol',tol,...
'Frequency of signal unexpected')
Expand Down

0 comments on commit 53fc814

Please sign in to comment.