Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL RS485 - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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 RS485 - Testing
Commits
1d0cfdde
Commit
1d0cfdde
authored
Nov 06, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: Added crate turn-on/turn-off
parent
988a6672
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
fan-speeds
pts/log/fan-speeds
+0
-4
pts.py
pts/python/pts.py
+10
-14
No files found.
pts/log/fan-speeds
deleted
100644 → 0
View file @
988a6672
iso.3.6.1.4.1.37968.1.1.5.2.1.3.1 = INTEGER: 15100
iso.3.6.1.4.1.37968.1.1.5.2.1.3.2 = INTEGER: 15100
iso.3.6.1.4.1.37968.1.1.5.2.1.3.3 = INTEGER: 0
iso.3.6.1.4.1.37968.1.1.5.2.1.3.4 = INTEGER: 0
pts/python/pts.py
View file @
1d0cfdde
...
...
@@ -69,8 +69,7 @@ sys.path.append('.')
##-------------------------------------------------------------------------------------------------
def
men_is_on
():
on
=
0
subprocess
.
call
(
"shell/get-fan-speeds"
,
shell
=
True
,
stdout
=
sys
.
stdout
,
\
stderr
=
sys
.
stderr
)
subprocess
.
call
(
"cd shell; ./get-fan-speeds"
,
shell
=
True
,
stdout
=
fnull
,
stderr
=
fnull
)
try
:
btxt
=
tuple
(
open
(
"log/fan-speeds"
,
"r"
))
for
i
in
range
(
1
,
len
(
btxt
)):
...
...
@@ -112,7 +111,7 @@ def men_off():
if
tmo
>
10
:
print
"FATAL ERROR: VME Crate: Unable to switch OFF"
sys
.
exit
(
1
)
time
.
sleep
(
1
0
)
time
.
sleep
(
1
)
##-------------------------------------------------------------------------------------------------
## Main "method" of PTS
...
...
@@ -127,8 +126,7 @@ if __name__ == '__main__':
# Clear the log dir (if any) and (re-)create it to store log and info files
subprocess
.
call
(
"rm -rf ./log; mkdir log; chmod 777 log"
,
shell
=
True
,
stdout
=
fnull
,
stderr
=
fnull
)
print
"---Turn off ELMA!!"
#men_off()
men_off
()
# Scan the first barcode
while
True
:
...
...
@@ -163,8 +161,7 @@ if __name__ == '__main__':
ok
=
raw_input
(
"--> Please type 'ok' to continue: "
)
print
"
\n
"
print
"---Turn on ELMA!!"
#men_on()
men_on
()
print
"Loading FPGA bitstream..."
ret
=
subprocess
.
call
(
"cd boot; ./program"
,
shell
=
True
,
stdout
=
fnull
,
stderr
=
fnull
)
...
...
@@ -186,11 +183,11 @@ if __name__ == '__main__':
else
:
time
.
sleep
(
1
)
#
# ... power-cycle the crate
# print "VME C
rate power-cycle..."
#
men_off()
#
time.sleep(5)
#
men_on()
# ... power-cycle the crate
print
"VME c
rate power-cycle..."
men_off
()
time
.
sleep
(
5
)
men_on
()
time
.
sleep
(
5
)
...
...
@@ -214,8 +211,7 @@ if __name__ == '__main__':
# We're done, turn off the VME crate
print
"
\n
Testing completed!"
print
"---Turn off ELMA!!"
#men_off()
men_off
()
# Finally, print anything that went wrong throughout the test programs by grepping the log and info files and
# exit when the user desires.
...
...
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