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
52bf1f16
Commit
52bf1f16
authored
Aug 29, 2013
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test31: Move program argument read out of main function.
Was causing trouble when called from pts.
parent
79a9a39a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
test31.py
test/fmcadc100m14b4cha/python/test31.py
+15
-12
No files found.
test/fmcadc100m14b4cha/python/test31.py
View file @
52bf1f16
...
@@ -42,7 +42,7 @@ test31: Fix EEPROM content:
...
@@ -42,7 +42,7 @@ test31: Fix EEPROM content:
Note: Requires test00.py to run first to load the firmware!
Note: Requires test00.py to run first to load the firmware!
"""
"""
def
main
(
default_directory
=
'.'
):
def
main
(
default_directory
=
'.'
,
offset
=
"0x1000"
,
filename
=
"calibration.sdb"
):
# Constants declaration
# Constants declaration
TEST_NB
=
31
TEST_NB
=
31
...
@@ -62,16 +62,8 @@ def main (default_directory='.'):
...
@@ -62,16 +62,8 @@ def main (default_directory='.'):
NEW_EEPROM_BIN_FILENAME
=
os
.
path
.
join
(
default_directory
,
NEW_EEPROM_BIN_FILENAME
)
NEW_EEPROM_BIN_FILENAME
=
os
.
path
.
join
(
default_directory
,
NEW_EEPROM_BIN_FILENAME
)
EEPROM_SIZE
=
8192
# in Bytes
EEPROM_SIZE
=
8192
# in Bytes
arg_nb
=
len
(
sys
.
argv
[
1
:])
BAD_SDB_DIR_OFFSET
=
offset
if
arg_nb
==
2
:
BAD_CALIBR_BIN_FILENAME
=
filename
BAD_SDB_DIR_OFFSET
=
sys
.
argv
[
1
]
BAD_CALIBR_BIN_FILENAME
=
sys
.
argv
[
2
]
elif
arg_nb
>
2
:
print
(
"Too many arguments."
)
sys
.
exit
()
else
:
BAD_SDB_DIR_OFFSET
=
"0x1000"
BAD_CALIBR_BIN_FILENAME
=
"calibration.sdb"
start_test_time
=
time
.
time
()
start_test_time
=
time
.
time
()
...
@@ -350,4 +342,15 @@ P1 Bank A nb signal=%d, P1 Bank B nb signal=%d, P2 Bank A nb signal=%d, P2 Bank
...
@@ -350,4 +342,15 @@ P1 Bank A nb signal=%d, P1 Bank B nb signal=%d, P2 Bank A nb signal=%d, P2 Bank
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
arg_nb
=
len
(
sys
.
argv
[
1
:])
if
arg_nb
==
2
:
offset
=
sys
.
argv
[
1
]
filename
=
sys
.
argv
[
2
]
elif
arg_nb
>
2
:
print
(
"Too many arguments."
)
sys
.
exit
()
else
:
offset
=
"0x1000"
filename
=
"calibration.sdb"
main
(
'.'
,
offset
,
filename
)
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