Commit 5bd0fd23 authored by Matthieu Cattin's avatar Matthieu Cattin

Add tolerance and expected value in test08 log.

parent cc4d792a
......@@ -82,7 +82,7 @@ def sw_test(gen, sine, awg_offset, fmc, sw, ssr_1, ssr_2, diff_tol, retry_nb=0,
time.sleep(SSR_SET_SLEEP)
adc_value = fmc.get_current_adc_value(i)
diff = adc_value_before-adc_value
print('CH%d ssr=0x%.2X: %d ssr=0x%.2X: %d diff:%d') % (i, ssr_1, adc_value_before, ssr_2, adc_value, diff)
print('CH%d ssr=0x%.2X: %d ssr=0x%.2X: %d diff:%d tolerance:%d') % (i, ssr_1, adc_value_before, ssr_2, adc_value, abs(diff), diff_tol)
if(diff_tol <= abs(diff)):
pass_nb += 1
fmc.set_ssr(i,0x0)
......@@ -109,7 +109,7 @@ def adc_mid_test(gen, sine, awg_offset, fmc, tol, retry_nb=0, threshold=0):
time.sleep(SSR_SET_SLEEP)
adc_value = fmc.get_current_adc_value(i)
diff = adc_value - 0x8000
print('CH%d ssr=0x%.2X: %d diff: %d') % (i, ssr_1, adc_value, diff)
print('CH%d ssr=0x%.2X: value:%d expected value:%d diff:%d tolerence:%d') % (i, ssr_1, adc_value, 0x8000, diff, tol)
if((-tol < diff) & (tol > diff)):
pass_nb += 1
print(' Number of good tests:%d threshold:%d') % (pass_nb, threshold)
......
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