Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha - Testing
Commits
c934a3f0
Commit
c934a3f0
authored
May 22, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test23: work in progress.
parent
63d4d7b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
test23.py
test/fmcadc100m14b4cha/python/test23.py
+6
-7
No files found.
test/fmcadc100m14b4cha/python/test23.py
View file @
c934a3f0
...
...
@@ -17,10 +17,11 @@ import os
sys
.
path
.
append
(
'../../../'
)
sys
.
path
.
append
(
'../../../gnurabbit/python/'
)
sys
.
path
.
append
(
'../../../common/'
)
sys
.
path
.
append
(
'../../fmceeprom/python/'
)
# Import common modules
from
ptsexcept
import
*
#
from fmc_eeprom import *
from
fmc_eeprom
import
*
import
rr
# Import specific modules
...
...
@@ -77,15 +78,15 @@ def main (default_directory='.'):
serial
=
f_serial
.
readline
()
f_serial
.
close
()
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
now_date
=
datetime
.
datetime
.
now
()
ref_date
=
datetime
.
datetime
(
1996
,
1
,
1
)
diff_date
=
now_date
-
ref_date
minutes
=
"
%
d"
%
int
(
diff_date
.
total_seconds
()
//
60
)
print
"Mfg date/time:
%
s minutes (since 0:00 1/1/96)
"
%
minutes
minutes
=
int
(
diff_date
.
total_seconds
()
//
60
)
print
"Mfg date/time:
%
d minutes (since 0:00 1/1/96)
\n
"
%
minutes
#==================================================
# Read calibration data from file
...
...
@@ -100,11 +101,9 @@ def main (default_directory='.'):
for
data
in
calibr_data
:
print
"0x
%02
X"
%
(
data
)
return
#==================================================
# Create Board Info Area
bia
=
BoardInfoArea
(
"CERN"
,
"FmcAdc100m14b4cha"
,
serial
,
"part number"
,
"fru"
)
bia
=
BoardInfoArea
(
minutes
,
"CERN"
,
"FmcAdc100m14b4cha"
,
serial
,
"part number"
,
"fru"
)
#==================================================
# Multirecords Area
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment