Skip to content

Commit

Permalink
TEST: Skip sample averaging length
Browse files Browse the repository at this point in the history
Signed-off-by: Julia Pineda <[email protected]>
  • Loading branch information
jpineda3 committed Mar 19, 2024
1 parent f99a9df commit eee2b5f
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions test/AD4630_24Tests.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
classdef AD4630_24Tests < HardwareTests

properties
uri = 'ip:192.168.10.171';
uri = 'ip:analog-2.local';
author = 'ADI';
end

Expand Down Expand Up @@ -66,18 +66,19 @@ function testAD4630_24AttrSampleRate(testCase,sample_rate)
'RelTol',0,'Sample rate unexpected')
end

function testAD4630_24AttrSampleAveragingLength(testCase,sample_averaging_length)
% The average mode works only with the output data mode set to 30-bit average
adc = adi.AD4630_24.Rx('uri',testCase.uri);
val = sample_averaging_length;
adc.SampleAveragingLength = val;
[data,valid] = adc();
ret_val = adc.getDeviceAttributeRAW('sample_averaging',8);
adc.release();
testCase.assertTrue(valid);
testCase.assertTrue(sum(abs(double(data)))>0);
testCase.assertTrue(strcmp(val,string(ret_val)));
end
% function testAD4630_24AttrSampleAveragingLength(testCase,sample_averaging_length)
% % The average mode works only with the output data mode set to 30-bit average
% % Skip test for now since it causes ERROR:READ LINE: -32 in iio_info
% adc = adi.AD4630_24.Rx('uri',testCase.uri);
% val = sample_averaging_length;
% adc.SampleAveragingLength = val;
% [data,valid] = adc();
% ret_val = adc.getDeviceAttributeRAW('sample_averaging',8);
% adc.release();
% testCase.assertTrue(valid);
% testCase.assertTrue(sum(abs(double(data)))>0);
% testCase.assertTrue(strcmp(val,string(ret_val)));
% end

function testAD4630_24DifferentialInputRMS(testCase,signal_vpp)
% Signal source setup
Expand Down

0 comments on commit eee2b5f

Please sign in to comment.