Commit 35645883 authored by Matthieu Cattin's avatar Matthieu Cattin

Add expected value and tolerance, change summary format for test09.

parent 70f0d1e2
......@@ -252,7 +252,7 @@ def main (default_directory='.'):
#time.sleep(2)
break
diff = max(channel_data)-min(channel_data)
print('CH%d diff:%d')%(i, diff)
print('CH%d amplitude:%d expected:%d +/-%d')%(i, diff, points[j][1], points[j][2])
ch_diff.append(diff)
fmc.set_input_range(i, 'OPEN')
if((diff < points[j][1]-points[j][2]) | (diff > points[j][1]+points[j][2])):
......@@ -267,10 +267,10 @@ def main (default_directory='.'):
#print('end loop j=%d')%(j)
# print freqency response to log
for ch in range(1,NB_CHANNELS+1):
print('Channel %d frequency response')%(ch)
for i in range(len(points)):
print('%2.3f, %d')%(points[i][0]/1E6, ch_diff[i*4+(ch-1)])
print('Channels frequency response')
print('Frequency, Expected value, tolerance, CH1 value, CH2 value, CH3 value, CH4 value')
for i in range(len(points)):
print('%2.3f, %d, %d, %d, %d, %d, %d')%(points[i][0]/1E6, points[i][1], points[i][2], ch_diff[i*4], ch_diff[i*4+1], ch_diff[i*4+2], ch_diff[i*4+3])
# The following code is to show a graph of the test results
# !! Don't forget to import numpy and pylab !!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment