Commit 08c22401 authored by unknown's avatar unknown

Corrects serial number loggining of conv-ttl-blo boards during pts-testing

parent 8c3f1a2d
......@@ -65,8 +65,11 @@ sys.path.append("pyts/")
# Import here ptsdefine.py, to avoid "uncaught" exceptions later on
from ptsexcept import *
from vv_pts import *
from ptsdefine import *
##-------------------------------------------------------------------------------------------------
## Method to turn on the VME crate.
##-------------------------------------------------------------------------------------------------
......@@ -105,6 +108,7 @@ if __name__ == '__main__':
# Turn off the VME crate
men_off()
bus = SKT(ELMASLOT)
# Scan the first barcode
while True:
sn1 = raw_input("--> Scan the 1st barcode: ")
......@@ -199,9 +203,17 @@ if __name__ == '__main__':
# 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
IDMS = testelma.read(ELMASLOT, UIDREGMS)
IDLS = testelma.read(ELMASLOT, UIDREGLS)
IDMS = bus.vv_read(UIDREGMS)
IDLS = bus.vv_read(UIDREGLS)
#Generate log file
......@@ -215,14 +227,9 @@ if __name__ == '__main__':
f = open("/home/pts-administrator/pts/log" + fname, "w")
print(" File not found ... Create new one \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("--------------------------------------------------------------------------------- \n")
f.write("* Target version is (v%2.1f)\n" % gwvers_target)
f.write("* Hardware (v0.0) means board is (v3.0) or earlier \n")
f.write("\n")
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("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.close()
print("Upgrade log can be found in /home/pts-administrator/pts/log/%s \n" % fname)
......
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