Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Conv TTL Blocking - Testing
Commits
08c22401
Commit
08c22401
authored
Aug 27, 2018
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrects serial number loggining of conv-ttl-blo boards during pts-testing
parent
8c3f1a2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
pts.py
fm/pts/python/pts.py
+16
-9
No files found.
fm/pts/python/pts.py
View file @
08c22401
...
@@ -65,8 +65,11 @@ sys.path.append("pyts/")
...
@@ -65,8 +65,11 @@ sys.path.append("pyts/")
# Import here ptsdefine.py, to avoid "uncaught" exceptions later on
# Import here ptsdefine.py, to avoid "uncaught" exceptions later on
from
ptsexcept
import
*
from
vv_pts
import
*
from
ptsdefine
import
*
from
ptsdefine
import
*
##-------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
## Method to turn on the VME crate.
## Method to turn on the VME crate.
##-------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
...
@@ -105,6 +108,7 @@ if __name__ == '__main__':
...
@@ -105,6 +108,7 @@ if __name__ == '__main__':
# Turn off the VME crate
# Turn off the VME crate
men_off
()
men_off
()
bus
=
SKT
(
ELMASLOT
)
# Scan the first barcode
# Scan the first barcode
while
True
:
while
True
:
sn1
=
raw_input
(
"--> Scan the 1st barcode: "
)
sn1
=
raw_input
(
"--> Scan the 1st barcode: "
)
...
@@ -199,9 +203,17 @@ if __name__ == '__main__':
...
@@ -199,9 +203,17 @@ if __name__ == '__main__':
# Reading board unique ID and storing to separate log file
# Reading board unique ID and storing to separate log file
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# ... power-cycle the crate
print
"VME Crate power-cycle..."
men_off
()
time
.
sleep
(
3
)
men_on
()
time
.
sleep
(
10
)
#Read unique board ID
#Read unique board ID
IDMS
=
testelma
.
read
(
ELMASLOT
,
UIDREGMS
)
IDLS
=
testelma
.
read
(
ELMASLOT
,
UIDREGLS
)
IDMS
=
bus
.
vv_read
(
UIDREGMS
)
IDLS
=
bus
.
vv_read
(
UIDREGLS
)
#Generate log file
#Generate log file
...
@@ -215,14 +227,9 @@ if __name__ == '__main__':
...
@@ -215,14 +227,9 @@ if __name__ == '__main__':
f
=
open
(
"/home/pts-administrator/pts/log"
+
fname
,
"w"
)
f
=
open
(
"/home/pts-administrator/pts/log"
+
fname
,
"w"
)
print
(
" File not found ... Create new one
\n
"
)
print
(
" File not found ... Create new one
\n
"
)
f
.
write
(
"
\n
"
)
f
.
write
(
"
\n
"
)
f
.
write
(
"CONV-TTL-XXX Upgrade log created on
%
s
\n
"
%
time
.
strftime
(
"
%
Y-
%
m-
%
d-
%
Hh
%
Mm
%
Ss"
,
time
.
localtime
()))
f
.
write
(
"CONV-TTL-BLO Upgrade log created on
%
s
\n
"
%
time
.
strftime
(
"
%
Y-
%
m-
%
d-
%
Hh
%
Mm
%
Ss"
,
time
.
localtime
()))
f
.
write
(
"---------------------------------------------------------------------------------
\n
"
)
f
.
write
(
"* Target version is (v
%2.1
f)
\n
"
%
gwvers_target
)
f
.
write
(
"* Hardware (v0.0) means board is (v3.0) or earlier
\n
"
)
f
.
write
(
"
\n
"
)
f
.
write
(
"---------------------------------------------------------------------------------
\n
"
)
f
.
write
(
"---------------------------------------------------------------------------------
\n
"
)
f
.
write
(
"Barcode 1 | Barcode 2 | PCB ID |
HW version | Old gw version | New gw version
\n
"
)
f
.
write
(
"Barcode 1 | Barcode 2 | PCB ID |
\n
"
)
f
.
write
(
"---------------------------------------------------------------------------------
\n
"
)
f
.
write
(
"---------------------------------------------------------------------------------
\n
"
)
f
.
close
()
f
.
close
()
print
(
"Upgrade log can be found in /home/pts-administrator/pts/log/
%
s
\n
"
%
fname
)
print
(
"Upgrade log can be found in /home/pts-administrator/pts/log/
%
s
\n
"
%
fname
)
...
...
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