Commit c934a3f0 authored by Matthieu Cattin's avatar Matthieu Cattin

test23: work in progress.

parent 63d4d7b5
...@@ -17,10 +17,11 @@ import os ...@@ -17,10 +17,11 @@ import os
sys.path.append('../../../') sys.path.append('../../../')
sys.path.append('../../../gnurabbit/python/') sys.path.append('../../../gnurabbit/python/')
sys.path.append('../../../common/') sys.path.append('../../../common/')
sys.path.append('../../fmceeprom/python/')
# Import common modules # Import common modules
from ptsexcept import * from ptsexcept import *
#from fmc_eeprom import * from fmc_eeprom import *
import rr import rr
# Import specific modules # Import specific modules
...@@ -77,15 +78,15 @@ def main (default_directory='.'): ...@@ -77,15 +78,15 @@ def main (default_directory='.'):
serial = f_serial.readline() serial = f_serial.readline()
f_serial.close() f_serial.close()
serial = serial[:-1] # remove EOL char serial = serial[:-1] # remove EOL char
print "Board's serial number: %s" % serial print "Board's serial number: %s\n" % serial
#================================================== #==================================================
# Calculate number of minutes since 0:00 1/1/96 # Calculate number of minutes since 0:00 1/1/96
now_date = datetime.datetime.now() now_date = datetime.datetime.now()
ref_date = datetime.datetime(1996, 1, 1) ref_date = datetime.datetime(1996, 1, 1)
diff_date = now_date - ref_date diff_date = now_date - ref_date
minutes = "%d"%int(diff_date.total_seconds()//60) minutes = int(diff_date.total_seconds()//60)
print "Mfg date/time: %s minutes (since 0:00 1/1/96)" % minutes print "Mfg date/time: %d minutes (since 0:00 1/1/96)\n" % minutes
#================================================== #==================================================
# Read calibration data from file # Read calibration data from file
...@@ -100,11 +101,9 @@ def main (default_directory='.'): ...@@ -100,11 +101,9 @@ def main (default_directory='.'):
for data in calibr_data: for data in calibr_data:
print "0x%02X" % (data) print "0x%02X" % (data)
return
#================================================== #==================================================
# Create Board Info Area # Create Board Info Area
bia = BoardInfoArea("CERN", "FmcAdc100m14b4cha", serial, "part number", "fru") bia = BoardInfoArea(minutes, "CERN", "FmcAdc100m14b4cha", serial, "part number", "fru")
#================================================== #==================================================
# Multirecords Area # Multirecords Area
......
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