Commit cc4d792a authored by Matthieu Cattin's avatar Matthieu Cattin

Add print of expected values to test07 log.

parent bc9e2ee1
......@@ -63,7 +63,7 @@ def main (default_directory='.'):
# Read channels current data register
for i in range(1,NB_CHANNELS+1):
adc_value = fmc.get_current_adc_value(i)
print('ADC channel %d value:0x%.4X') % (i, adc_value)
print('ADC channel %d value:0x%.4X expected value:0x%.4X') % (i, adc_value, ADC_POS)
if(ADC_POS != adc_value):
print('Channel %d offset circuit is malfunctioning')%(i)
error += 1
......@@ -77,7 +77,7 @@ def main (default_directory='.'):
# Read channels current data register
for i in range(1,NB_CHANNELS+1):
adc_value = fmc.get_current_adc_value(i)
print('ADC channel %d value:0x%.4X tolerance:0x%.4X') % (i, adc_value, ADC_TOL)
print('ADC channel %d value:0x%.4X expected value:0x%.4X tolerance:0x%.4X') % (i, adc_value, ADC_MID, ADC_TOL)
if((ADC_MID-ADC_TOL > adc_value) | (ADC_MID+ADC_TOL < adc_value)):
print('Channel %d offset circuit is malfunctioning')%(i)
error += 1
......@@ -92,7 +92,7 @@ def main (default_directory='.'):
# Read channels current data register
for i in range(1,NB_CHANNELS+1):
adc_value = fmc.get_current_adc_value(i)
print('ADC channel %d value:0x%.4X') % (i, adc_value)
print('ADC channel %d value:0x%.4X expected value:0x%.4X') % (i, adc_value, ADC_NEG)
if(ADC_NEG != adc_value):
print('Channel %d offset circuit is malfunctioning')%(i)
error += 1
......
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